Tag: 反击

使用反引号从Rails应用程序中启动另一个Rails服务器

我目前正在开发一个Rails应用程序,作为另一个Rails应用程序的更新程序。 我有更新过程, 下载新版本zip 提取到正确的位置 同步资产 捆绑安装 预编译资产 启动服务器 – bundle exec rails server 我在最后一步遇到了问题。 当我跑: Dir.chdir(‘../other-project’) `bundle exec rails server -d -p 3000` 从更新程序应用程序,它似乎是从更新程序包中提取而不是它应该从中提取的新应用程序包。 更新程序是用Rails 4编写的,它正在更新的应用程序是rails 3。 当我尝试启动服务器时,我得到以下内容: /home/vagrant/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/railtie/configuration.rb:95:in `method_missing’: undefined method `handlebars’ for # (NoMethodError) from /home/vagrant/apps/other-project/config/application.rb:22:in `’ from /home/vagrant/apps/other-project>’ from /home/vagrant/apps/other-project/config/application.rb:13:in `’ from /home/vagrant/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:79:in `require’ from /home/vagrant/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:79:in `block in server’ from /home/vagrant/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `tap’ […]