Hi Guys.
I have installed the one-click ruby-rails droplet following the tutorial, but I have to use ruby-1.9.3 because it’s an old project that I want to migrate from heroku.
After installing the correct ruby and all the gems for my project I changed the paths for the ruby in the file /etc/default/unicorn as follow:
PATH=/usr/local/rvm/rubies/ruby-1.9.3-p484/bin:/usr/local/rvm/gems/ruby-1.9.3-p484/bin/:/home/unicorn/.rvm/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:$
I have just defined the correct paths for ruby-1.9.3. But when starting the unicorn server Im getting this error:
$service unicorn start
– Control frame information -----------------------------------------------
c:0025 p:---- s:0103 b:0103 l:000102 d:000102 CFUNC :method_defined?
c:0024 p:-1922520 s:0101 b:0101 l:000100 d:000100 TOP
c:0023 p:---- s:0099 b:0099 l:000098 d:000098 CFUNC :require
c:0022 p:0159 s:0095 b:0095 l:000094 d:000094 METHOD /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55
c:0021 p:0033 s:0085 b:0085 l:000084 d:000084 TOP /usr/local/rvm/gems/ruby-2.0.0-p353/gems/kgio-2.8.1/lib/kgio.rb:21
c:0020 p:---- s:0083 b:0083 l:000082 d:000082 FINISH
c:0019 p:---- s:0081 b:0081 l:000080 d:000080 CFUNC :require
c:0018 p:0159 s:0077 b:0077 l:000076 d:000076 METHOD /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55
c:0017 p:0059 s:0067 b:0067 l:000066 d:000066 TOP /usr/local/rvm/gems/ruby-2.0.0-p353/gems/unicorn-4.7.0/lib/unicorn.rb:6
c:0016 p:---- s:0065 b:0065 l:000064 d:000064 FINISH
c:0015 p:---- s:0063 b:0063 l:000062 d:000062 CFUNC :require
c:0014 p:0270 s:0059 b:0059 l:000058 d:000058 METHOD /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73
c:0013 p:0069 s:0049 b:0049 l:000048 d:000048 TOP /usr/local/rvm/gems/ruby-2.0.0-p353/gems/unicorn-4.7.0/lib/unicorn/launcher.rb:9
c:0012 p:---- s:0047 b:0047 l:000046 d:000046 FINISH
c:0011 p:---- s:0045 b:0045 l:000044 d:000044 CFUNC :require
c:0010 p:0270 s:0041 b:0041 l:000040 d:000040 METHOD /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73
c:0009 p:0011 s:0031 b:0031 l:000030 d:000030 TOP /usr/local/rvm/gems/ruby-2.0.0-p353/gems/unicorn-4.7.0/bin/unicorn:3
c:0008 p:---- s:0025 b:0025 l:000024 d:000024 FINISH
c:0007 p:---- s:0023 b:0023 l:000022 d:000022 CFUNC :load
c:0006 p:0167 s:0019 b:0019 l:0011e8 d:001bd8 EVAL /usr/local/rvm/gems/ruby-2.0.0-p353/bin/unicorn:23
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 FINISH
c:0004 p:---- s:0013 b:0013 l:000012 d:000012 CFUNC :eval
c:0003 p:0160 s:0007 b:0007 l:0011e8 d:001830 EVAL /usr/local/rvm/gems/ruby-1.9.3-p484/bin//ruby_executable_hooks:15
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0011e8 d:0011e8 TOP
– Ruby level backtrace information ----------------------------------------
/usr/local/rvm/gems/ruby-1.9.3-p484/bin//ruby_executable_hooks:15:in <main>' /usr/local/rvm/gems/ruby-1.9.3-p484/bin//ruby_executable_hooks:15:in eval’
/usr/local/rvm/gems/ruby-2.0.0-p353/bin/unicorn:23:in <main>' /usr/local/rvm/gems/ruby-2.0.0-p353/bin/unicorn:23:in load’
/usr/local/rvm/gems/ruby-2.0.0-p353/gems/unicorn-4.7.0/bin/unicorn:3:in <top (required)>' /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in require’
/usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in require' /usr/local/rvm/gems/ruby-2.0.0-p353/gems/unicorn-4.7.0/lib/unicorn/launcher.rb:9:in <top (required)>’
/usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in require' /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in require’
/usr/local/rvm/gems/ruby-2.0.0-p353/gems/unicorn-4.7.0/lib/unicorn.rb:6:in <top (required)>' /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require’
/usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require' /usr/local/rvm/gems/ruby-2.0.0-p353/gems/kgio-2.8.1/lib/kgio.rb:21:in <top (required)>’
/usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require' /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require’
/usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `method_defined?’
– C level backtrace information ------------------------------------------- Segmentation fault
Seems like unicorn is trying to use ruby-2.0.0 and 1.9.3 at the same time? any help would be appreciate.
Regards
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!
I found the solution! <br> <br>It’s also necessary to change the PATH in the /etc/init.d/unicorn file, by default is pointing to ruby-2.0.0, by changing those paths the unicorn server will start without an issue. <br> <br>Regards
Thanks, this works. Have searched for different articles and this one finally helps.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.