上传到Heroku DB rake:迁移问题 [英] Uploading to Heroku DB rake:migrate problem
问题描述
我遵循Ruby on Rails教程(http://ruby.railstutorial.org),并且在脚手架,我输入heroku rake db:migrate并得到以下错误:
rake中止!请安装postgresql适配器:
gem install
(pg不是bundle的一部分,将它
activerecord-postgresql-adapter
添加到Gemfile中。)
任务:TOP => db:migrate => db:load_config(通过使用--trace运行
任务来查看完整跟踪)
第一次,没问题,但这次我得到这个错误。任何想法?
不是Simone的答案,但经过更多挖掘后,答案终于出现了。我需要执行以下操作:
在gemfile中,我需要将gem'sqlite3'更改为:
然后我需要 heroku创建 - 堆雪松。
感谢大家的帮助,我希望这能帮助未来的人。
having a problem with a heroku upload. Quite new to RoR so please excuse the beginners question.
I'm following the Ruby on Rails Tutorial (http://ruby.railstutorial.org), and after the scaffolding, I type heroku rake db:migrate and get the following error:
rake aborted! Please install the postgresql adapter:
gem install activerecord-postgresql-adapter
(pg is not part of the bundle. Add it to Gemfile.)Tasks: TOP => db:migrate => db:load_config (See full trace by running task with --trace)
First time around, no problem, but this time I'm getting this error. Any ideas?
解决方案Not quite the answer Simone, but after more digging, the answer finally came up. I needed to do the following:
In the gemfile, I needed to change gem 'sqlite3' to:
group :development, :test do gem 'sqlite3' end group :production do gem 'pg' end
and then I needed to heroku create --stack cedar.
Thanks for your help everyone regardless, and I hope this helps someone in the future.
这篇关于上传到Heroku DB rake:迁移问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!