rails 3.2.13
我的 heroku 应用似乎突然停止了预编译。
当我执行 git push heroku master 时,它没有错误地完成。 另外,当我执行 heroku rake db:migrate 时,一切似乎都很好。 但是当我尝试加载站点或运行“heroku run rails c”时,出现应用程序错误。 在日志中,我看到它无法识别我的“gmaps4rails”gem。 (这不仅仅是在开发中)。 在我最后一次重大提交之前,这工作得很好,所以我一定是破坏了什么,我只是不知道是什么。 该网站在开发中运行良好。
尝试以我能找到的所有方式重建 heroku 数据库,但没有结果。
这是 heroku 日志转储:
2013-10-24T22:09:02.244984+00:00 heroku[api]: Starting process with command
bundle exec rake db:migrate
by xxx@yahoo.com
2013-10-24T22:09:10.239594+00:00 heroku[run.8498]: Awaiting client
2013-10-24T22:09:10.319099+00:00 heroku[run.8498]: Starting process with commandbundle exec rake db:migrate
2013-10-24T22:09:11.463254+00:00 heroku[run.8498]: State changed from starting to up
2013-10-24T22:09:15.090835+00:00 heroku[run.8498]: Process exited with status 0
2013-10-24T22:09:15.109542+00:00 heroku[run.8498]: State changed from up to complete
2013-10-24T22:15:48.976455+00:00 heroku[web.1]: State changed from
crashed to starting 2013-10-24T22:15:56.503853+00:00 heroku[web.1]: Starting process with commandbundle exec rails server -p 51113
2013-10-24T22:15:59.948210+00:00 app[web.1]: => Booting WEBrick
2013-10-24T22:15:59.948210+00:00 app[web.1]: => Rails 3.2.13 application starting in production on "http://0.0.0.o:51113"
2013-10-24T22:15:59.948210+00:00 app[web.1]: => Call with -d to detach
2013-10-24T22:15:59.948210+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-10-24T22:15:59.948210+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2013-10-24T22:16:00.937338+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:inrequire' <br> 2013-10-24T22:16:00.937338+00:00 app[web.1]: from /app/app/models/project.rb:52:in
'
2013-10-24T22:16:00.937338+00:00 app[web.1]: from /app/app/models/project.rb:29:in<top (required)>' <br> 2013-10-24T22:16:00.937338+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in
block in require'
2013-10-24T22:16:00.936345+00:00 app[web.1]: Exiting
2013-10-24T22:16:00.937338+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:inload_dependency' <br> 2013-10-24T22:16:00.937338+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:502:in
load_missing_constant'
2013-10-24T22:16:00.937338+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:inmethod_missing': undefined method
acts_as_gmappable' for # (NoMethodError) 201
任何帮助将不胜感激。
最佳答案
为了查看数据库的状态以了解这对您的应用程序有何影响,请尝试
heroku pg:psql
(假设是 Postgres)
然后从那里运行您的 SQL 命令。参见 here了解更多。
我还能够将我的 IDE 连接到 Heroku 上的数据库。我正在使用 RubyMine,因此需要使用正确的 JDBC URL 来实现这一点。
关于ruby-on-rails - Heroku 不在编译中使用 gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19577959/