views:

752

answers:

1

I got this error:

Could not find gem 'mysql2 (>= 0, runtime)' in any of the gem sources.
Try running `bundle install`.

when trying:

rails script/generate scaffold post title:string

I am on a mac osx, rails 1.8.7, 3.0

+2  A: 

You use rails script/generate … with rails 3.0? Maybe you upgraded rails 2.x project? With rails 3 you should use rails generate … or shorter rails g ….

About missing gem: run bundle install as asked for :)

tig
ok it worked, i got the same error on ubuntu and bundle install didn't make it work, but on my mac it is working thanks.
Blankman
on ubuntu: try simply installing it with `gem install mysql2`, try updating gem system `gem update --system` and installing
tig