2

i need some help at ruby on rails specially with ruby gems.

If i use the "rails generate scaffold something", I get always the failure:

"Specified 'mysql2' for database adapter, but the gem is not loaded. Add 'gem' mysql2 to your Gemfile(Gem::LoadError)"

If i use the command "gem -list" mysql2(0.3.15) will show up in this list.

After some search i read(Install mysql adapter gem install) that i should edit the Gemfile and add gem 'mysql2', "~>0.3.15" instead of gem 'mysql2' in Gemfile.

So my problem is now where is this Gemfile located. I use ruby on Windows 7, and i installed Ruby with the "railsinstaller-2.2.2"

Regards, dot

Community
  • 1
  • 1
dot
  • 486
  • 1
  • 8
  • 17
  • 2
    You must have created a Rails project, in which you are calling `rails generate scaffold`... The `Gemfile` should be at the root directory or that rails project. If it isn't (for some crazy reason) I would recommend re-creating the rails project with `rails new`. – Michael Berkowski Feb 07 '14 at 16:37
  • After changing the Gemfile, run `bundle install`. – Michael Berkowski Feb 07 '14 at 16:38

0 Answers0