English 中文(简体)
将宝石添加到 Gemfile 和与 Capistrano 一起部署之后的运行时间错误
原标题:Errors as runtime after adding gems to Gemfile and deploying with Capistrano

我们开发了一条铁路3.2 应用程序,并正在向Linux VPS部署,使用该轨道的指令: http://railscasts.com/episodes/335-depteting-to-a-vps ,除了我们使用rvm而不是rbenv。我们正在使用nginx、独角兽、rvm、铁路3.2和后方格。

最初的cap部署:Cold 精良,此后我们进行了几次部署,但没有改变最初部署的宝石。

我们现在添加了 poginate 和相关代码, 并像往常一样使用 < code> cap 部署 。 部署运行没有错误, 我可以看到呼叫 < code> bundle install -- path/ home/..../ / 共享/ bundle -- 部署 (还有其他选项) 。

问题是,当我们访问使用 poginate 的应用程序页面时,我们会在日志中看到以下错误: NoMethodError 未定义的方法 piginate

这告诉我,由于某种原因, 铁路应用程序无法使用宝石。

我已切入框中, 如果我运行 < code> bundle list 我可以看到列出的 will_ paginate 。 如果我从上面检查捆包位置( / home/..../ shared/ bundle), 将会有_ paginate 。

我重新开始了独角兽,还是没有欢乐。我想这是个路径问题,但我不知道为什么其他的宝石可以买到,但新的宝石却不能买到。

有什么想法我可以去 调试这个问题吗?

此工程为开放源码, 位于 Github 上, 以便您在此查看各种配置文件 : https://github.com/andSypike/lagtv

提前感谢

安迪

问题回答

我遇到了同样的问题。我唯一能让独角兽重新"重新"的方法(如果这是正确的词)是手动停止独角兽,然后重新开始。在我的系统中,它:

    /etc/init.d/unicorn_appname stop
    /etc/init.d/unicorn_appname start

但任何对Gemfile的调整 都要求我开始/停止。





相关问题
Is there a Perl or Lua alternative to Capistrano?

For a number of web-applications I need something like Capistrano to automate deployment. I know Capistrano can be used to deploy non-ruby applications but I m not familiar with Ruby, so I expect ...

Capistrano not restarting

Capistrano is deploying cold, deploying updates and uploading the symlink fine. It will not however restart. I notice that permission is denied on the /script/process/reaper file. I have found a ...

How to build task gems:install

I am deploying my rails app to a linux server and i have some of the rake tasks missing inlcuding rake gems:install and rake db I am running rails 2.3.4 from GEM. Why is this? How do I fix this? ...

Multiple webs on a server using capistrano

Is there any way to configure Capistrano for deploying many webs on a server? I would like to have a project on port 80 an other project on port 1000 and manage each one with different dbs.

Starting delayed_job at startup

I m using delayed_job with capistrano and would like a way to start delayed_job on startup of the web application using the script/delayed_job start . This way capistrano can restart it on deploy. ...

热门标签