I am currently working on a Rails application that serves as an update to another Rails application.
I have an update process,
- Download new zip version
- Pull to the right place
- Sync assets
- Package installation
- Precompile Assets
- Start server with - bundle exec rails server
I have a problem with the last step.
When I run:
Dir.chdir('../other-project') `bundle exec rails server -d -p 3000`
from the updater application, it seems, it is pulled from the service pack and not the new application package from which it should be extracted.
The updater is written in Rails 4, and the updated application is rails 3.
When I try to start the server, I get the following:
/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 #<Rails::Application::Configuration:0x007f9de18de100> (NoMethodError) from /home/vagrant/apps/other-project/config/application.rb:22:in `<class:Application>' from /home/vagrant/apps/other-project>' from /home/vagrant/apps/other-project/config/application.rb:13:in `<top (required)>' 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' 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 `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:40:in `run_command!' from /home/vagrant/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/railties-4.1.4/lib/rails/commands.rb:17:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>'
From this conclusion, I can say that he is trying to use the wrong version of railties ...
When I manually cd ../other-project and bundle exec rails server -d -p 3000 works fine.
Are there any bash tricks that I can use to get around this? Base Box - Ubuntu 14.04
Thanks!
source share