简体   繁体   English

在Heroku上推送Rails3。 找不到mysql gem

[英]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 使用rails 3推送到heroku时出现错误。我在使用ruby 1.8.7的Windows上

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不使用您用于在本地运行应用程序的数据库。

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

Did you freeze Rails into vendor? 您是否将Rails冻结为供应商? This problem usually appears with Heroku when you freeze Rails. 冻结Rails时,Heroku通常会出现此问题。 You must leave Heroku use it's own Rails based on your .gems file. 您必须根据.gems文件让Heroku使用它自己的Rails。 You can read more about this here http://docs.heroku.com/gems#heroku-gem-manifest 您可以在此处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? 如果这不是问题,您是否遵循有关Heroku和Rails 3应用程序的说明? 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. 您可以在http://docs.heroku.com/rails3上阅读有关此内容的信息。请注意,必须设置Bamboo堆栈 ,Rails 3应用程序才能正常工作。

您需要在Gemfile中包含mysql gem

gem "mysql"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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