简体   繁体   中英

push Rails3 on Heroku. can not find mysql gem

i'm getting an error when pushing to heroku using rails 3. I'm on windows with ruby 1.8.7

Administrator@WIN-DQC3IH63U7C ~/nasha (master)
$ heroku rake db:migrate
rake aborted!
no such file to load -- mysql
/disk1/home/slugs/280561_9c64ba2_1741/mnt/Rakefile:4
(See full trace by running task with --trace)
(in /disk1/home/slugs/280561_9c64ba2_1741/mnt)

Heroku doesn't use the database you use for running your application locally.

Heroku uses PostgreSQL ( http://docs.heroku.com/database )

Did you freeze Rails into vendor? This problem usually appears with Heroku when you freeze Rails. You must leave Heroku use it's own Rails based on your .gems file. You can read more about this here http://docs.heroku.com/gems#heroku-gem-manifest

If this is not the problem, did you follow the instructions regarding Heroku and Rails 3 applications? You can read about it here http://docs.heroku.com/rails3 Please notice that you must setup the Bamboo Stack for your Rails 3 application to work correctly.

您需要在Gemfile中包含mysql gem

gem "mysql"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM