Rails: looking for wrong sources in gemfile. how to fix?

I believe you're experiencing confusion over using bundler and RubyGems. When you gem install 0.2.6 To install the right version, go to your project folder in the command line. Type bundle install Give it a minute and that should be it--try running rails s again If this seems confusing and unnecessary, just remember that when someone updates a gem, they could make it change in ways that would break your program.

Bundler does you a service by ensuring that your program is running with specific versions of the gems needed (in this case, mysql2-0.2.6 instead of mysql2-0.3.6).

I believe you're experiencing confusion over using bundler and RubyGems. When you gem install , you're using a RubyGems commands to install the newest version of . Rails projects come with a gem called bundler, which also manages gems.

Bundler builds a separate copy of gems for each Rails project that you create a Gemfile for. If you don't recall making a Gemfile, that's because it's one of the files that rails new will generate for you. Most likely, you haven't run a bundle install.

Before you do, go to the folder for your current Rails project and open up Gemfile, just so you know what's going on. I'm willing to bet there's a line in there like this: gem 'mysql2', '~> 0.2.6' To install the right version, go to your project folder in the command line. Type bundle install.

Give it a minute and that should be it--try running rails s again. If this seems confusing and unnecessary, just remember that when someone updates a gem, they could make it change in ways that would break your program. Bundler does you a service by ensuring that your program is running with specific versions of the gems needed (in this case, mysql2-0.2.6 instead of mysql2-0.3.6).

I went to my folder and did Gemfile and go no result. Then I did bundle install and it installed a few things, but when I ran "rails server" after it gave me the error message in the most recent update in my OP – Michael Jul 26 at 5:52 By open Gemfile, I meant edit it, just to take a look at it. Could you update your original post with bundle list, please?

It'll get mangled by the StackOverflow formatting if you paste it as a comment – Eric Hu Jul 26 at 8:48 o. K, I did bundle list and pasted the results in the OP. – Michael Jul 26 at 8:53 Apparently this is a common issue with MySQL and Rails--I've only used PostgreSQL (and the default sqlite), so I've been unexposed to the problem.

However, this is a great blog post explaining why you get the error and what you should do. It's a short read and I highly recommend reading through it. It explains the install_name_tool approach you saw earlier and why that's a less-than-ideal solution – Eric Hu Jul 26 at 9:17 1 sorry for the delay, I was travelling.

– Michael Jul 267 at 13:39.

Clean out that gem and reinstall it. Alternatively, RVM + Mac Homebrew for the MySQL installation works wonders.

Thanks, how do I "clean out that gem". I'm a newbie...is it just "uninstall_name_tool"? – Michael Jul 25 at 5:46 I did a "gem list" command and there isn't even a name_tool gem... – Michael Jul 25 at 5:52 Uninstall the gem and make sure the /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6 is gone.

– Robert Rouse Jul 25 at 12:44 with all due respect, I don't think you understand the problem. The gem mysql2-0.2.6 doesn't exist. When I did the name_tool described in OP, it told the system to look for mysql2-0.2.6 but it doesn't exist so I can't uninstall it.

See my updated OP for a list of currently installed gems... – Michael Jul 250 at 2:01.

I believe you're experiencing confusion over using bundler and RubyGems. When you gem install.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions