【发布时间】:2011-12-11 21:53:57
【问题描述】:
我正在尝试使用我的 mySQL 数据库执行 heroku db:migrate,但我收到了错误/建议:
请安装 postgresql 适配器:gem install activerecord-postgresql-adapter(pg 不是捆绑包的一部分。将其添加到 Gemfile。)
我尝试将“gem install activerecord-postgresql-adapter”放在我的 gem 文件中,但是当我运行 bundle install 时,我得到:
charlotte-dator:showwwdown holgersindbaek$ 捆绑安装
/Users/holgersindbaek/Projekter/Showwwdown/showwwdown/Gemfile:34:in evaluate': undefined local variable or methodactiverecord' for # (NameError)
来自 /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/definition.rb:17:in build'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler.rb:138:indefinition'
来自 /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/cli.rb:219:in install'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:insend'
来自 /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in run'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:ininvoke_task'
来自 /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in dispatch'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:instart'
来自 /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/bin/bundle:13
来自 /usr/bin/bundle:19:in `load'
来自 /usr/bin/bundle:19
希望您能提供帮助。谢谢!
【问题讨论】:
-
谢谢。那里似乎有一些帮助。在我将 gem 'pg' 添加到我的 gemfile 并运行 bundle install 后,我忘记提交并推送到 heroku
标签: ruby-on-rails ruby database heroku migrate