ruby-on-rails - Heroku 不在编译中使用 gem

标签 ruby-on-rails ruby ruby-on-rails-3 heroku

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 command bundle 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 command bundle 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:in require' <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:inblock 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:in load_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:inload_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:in method_missing': undefined methodacts_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/

相关文章:

ruby-on-rails - 如何将 postcss-import 与 tailwindcss-rails 和 importmaps 一起使用

ruby-on-rails - Ruby on Rails - 使用 :include in Model of different schema

ruby-on-rails - 无法将主分支推送到 Git 中的 Heroku

Css 文本内阴影的扭曲! (rails 3 中的表单提交按钮)

jquery - Rails 3.2 Bootstrap 工具提示报告 ".tooltip() is not a function"

ruby-on-rails - 增量计数器和 rails "first"使用 postgreSQL 奇怪的行为

ruby-on-rails - 如何在 Rails 引擎中使用 ActiveSupport::Configurable

ruby-on-rails - Rspec 突然停止工作因为 `require' : no such file to load

ruby-on-rails - 如何正确使用模拟?

ruby-on-rails - Rails 在 Nginx 和 Unicorn 中使用 Websockets?