Answer the question
In order to leave comments, you need to log in
How to launch a site on Ruby and Unicorn?
So, given: A site on rails that needs to be transferred from one server (hereinafter referred to as the source) to another (hereinafter referred to as the server) without access to the original repository. The question was partly discussed here How to correctly migrate a live site to Ruby on rail... , but then it was more of a theoretical discussion. Now specific questions have gone:
What has been done:
0. Ubuntu 14.04 LTS is loaded on VirtualBox, rvm is up, the latest version of ruby is installed and the version that was used on the source. I did this:
<br>
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3<br>
\curl -sSL https://get.rvm.io | bash -s stable --rails -скачиваем и устанавливаем РВМ с последней версией рельс<br>
rvm install 2.2.0 - скачиваем нужную версию<br>
gem install unicorn - пытаемся установить Unicorn<br>
bundle install - пытаемся установить сайт<br>
cd /path/to/repository/current && rvm use 2.2.0 && bundle exec unicorn -c /path/to/repository/current/config/unicorn.rb -D -E production
Using /home/master/.rvm/gems/ruby-2.2.0
/path/to/repository/shared/bundle/ruby/2.2.0/gems/kgio-2.9.2/lib/kgio.rb:21:in `require': /path/to/repository/shared/bundle/ruby/2.2.0/gems/kgio-2.9.2/lib/kgio_ext.so: wrong ELF class: ELFCLASS64 - /path/to/repository/shared/bundle/ruby/2.2.0/gems/kgio-2.9.2/lib/kgio_ext.so (LoadError)
from /path/to/repository/shared/bundle/ruby/2.2.0/gems/kgio-2.9.2/lib/kgio.rb:21:in `<top (required)>'
from /path/to/repository/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn.rb:6:in `require'
from /path/to/repository/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn.rb:6:in `<top (required)>'
from /path/to/repository/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/launcher.rb:9:in `require'
from /path/to/repository/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/launcher.rb:9:in `<top (required)>'
from /path/to/repository/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/bin/unicorn:3:in `require'
from /path/to/repository/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/bin/unicorn:3:in `<top (required)>'
from /path/to/repository/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `load'
from /path/to/repository/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>'
Answer the question
In order to leave comments, you need to log in
bundle install - we are trying to install the site - it's just a thrill,
I hope you did this:
'/path/to/repository/'
by hand, otherwise everything is very bad.
Using /home/master/.rvm/gems/ruby-2.2.0
/path/to/repository/shared/bundle/ruby/2.2.0/gems/kgio-2.9.2/lib/kgio.rb:21:in `require': /path/to/repository/shared/bundle/ruby/2.2.0/gems/kgio-2.9.2/lib/kgio_ext.so: wrong ELF class: ELFCLASS64 - /path/to/repository/shared/bundle/ruby/2.2.0/gems/kgio-2.9.2/lib/kgio_ext.so (LoadError)
from /path/to/repository/shared/bundle/ruby/2.2.0/gems/kgio-2.9.2/lib/kgio.rb:21:in `<top (required)>'
from /path/to/repository/shared/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn.rb:6:in `require'
...
indicates that the kgio_ext.so library was taken from an old machine on which it was compiled for a different architecture (64 bit). sudo apt-get install ruby2.2 ruby2.2-dev ruby-switch
sudo ruby-switch --set ruby2.2
bundle check
if everything is in order with the root of the application and runbundle install --path vendor --without development test
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question