How to downgrade Rails from 2.0.0 to 1.9.3 and update Unicorn config?

Hi. Currently the droplet started with application rails image has ruby 2.0.0 and rails 4. I’m trying to downgrade but haven’t been able to do so. Basically my steps were:

  • rvm install 1.9.3
  • set 1.9.3 as default with rvm
  • updated GEM_PATH, GEM_HOME and DAEMON paths in /etc/init.d/unicorn as following:

export GEM_HOME=/usr/local/rvm/gems/ruby-1.9.3-p547 export GEM_PATH=/usr/local/rvm/gems/ruby-1.9.3-p547:/usr/local/rvm/gems/ruby-1.9.3-p547@global DAEMON=/usr/local/rvm/gems/ruby-1.9.3-p547/bin/unicorn

Error I get:

  1. /usr/bin/env: ruby_executable_hooks: No such file or directory
  2. I was also getting something like "unable to stat … "

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

After you install 1.9.3, make sure you also install the necessary gems that we installed system wide for 2.0.0. Use rvm to switch back to 2.0.0 and run <code>gem list</code> to see the full list of gems that were installed system wide for the default install. The key one is of course unicorn.

Also make sure you update the value for <code>PATH</code> in the unicorn configuration file at <code>/etc/default/unicorn</code>