When upgrade an Rails application from Ruby 1.9.3 to 2.0.0 by using rvm, it throws out error as:
Raw process output:
--> Compiling passenger_native_support.so for the current Ruby interpreter...
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
--> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...
(set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/4.0.48/rubyext-ruby-2.0.0-x86_64-linux.tar.gz: Resolving timed out after 4516 milliseconds
Trying next mirror...
Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/4.0.48/rubyext-ruby-2.0.0-x86_64-linux.tar.gz: Resolving timed out after 4516 milliseconds
--> Continuing without passenger_native_support.so.
/usr/local/rvm/gems/ruby-2.0.0-p451/gems/json-1.8.1/lib/json/common.rb:67: [BUG] Segmentation fault
ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux]
It turned out the passenger_native_support.so was missed in rvm /usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/x86_64-linux/ folder.
So searched and found it in /usr/lib/ruby/2.0.0/x86_64-linux-gnu/ then copied it to /usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/x86_64-linux/
Can I know how you solve this problem. This bothers me for so long...
ReplyDeleteTag,
DeleteCan you search passenger_native_support.so if it existed in somewhere? On my server, it's under /usr/lib/ruby/2.0.0/x86_64-linux-gnu/ , then we'll need to copy it over the /usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/x86_64-linux/
My ruby is 2.3 and compile from tgz file myself. And my passenger is installed via yum (official repo) in CentOS7.2
ReplyDeleteSo it's not going to work on mine. Do you have any idea about this?
I've setup ruby 2.0.0 with rvm and passenger from its repo on a Ubuntu box. We should look into the log to see detail errors.
DeleteIt's weird. It works well if I choose the method 'gem install passenger; passenger-install-nginx-module'. But if fails using yum repo.
ReplyDeleteI don't really prefer passenger-install-nginx-module, because it will not be easy to prepare server to me... :'(
Thanks for your reply. These are my logs. please let me know if you have any idea.
ReplyDeletehttps://twitter.com/charlie_hsieh/status/720469118621741057
can you post the text content here? I can't read them in your screenshot
Deletelet's find out where passenger_native_support.so locates and copy over to the current ruby lib
DeleteIt took me 1 week every night.. tried every location, every permision...
ReplyDelete... ha... give up on yum.... I like to manage service by systemd though..... :'(
I'm gonna be back to commom way in gem install passenger && passenger-install-nginx-module.
and write systemd via sample https://www.nginx.com/resources/wiki/start/topics/examples/systemd/
Thanks for your kindly help...
if you ever try to install passenger via apt-get or yum though phusion official please share with me. Thanks a lot :)
ReplyDeleteI copy from my old Ansible roles here:
passenger_repo: 'deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main'
- name: Check Phusion Passenger APT repository is installed
stat: path=/etc/apt/sources.list.d/passenger.list
register: passenger_list_path
when: passenger_repo is defined and ansible_os_family == "Debian"
- name: Setup Phusion Passenger
#Ref: https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu
shell: "{{item}}"
with_items:
# Setup Phusion Passenger APT repository
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
- apt-get -y install apt-transport-https ca-certificates
- "echo {{passenger_repo}} > /etc/apt/sources.list.d/passenger.list"
- "chown root:root /etc/apt/sources.list.d/passenger.list"
- chmod 600 /etc/apt/sources.list.d/passenger.list
- apt-get -y update
when: passenger_repo is defined and ansible_os_family == "Debian" and not passenger_list_path.stat.exists
- name: Make sure libapache2-mod-passenger is installed (Debian)
apt: pkg=libapache2-mod-passenger state=present
when: passenger_repo is defined and ansible_os_family == "Debian" and not passenger_list_path.stat.exists
- name: Enable the Phusion Passenger Apache module
command: a2enmod passenger
when: passenger_repo is defined and ansible_os_family == "Debian" and not passenger_list_path.stat.exists
if rvm is installed
stat: path=/usr/local/rvm/scripts/rvm
register: rvm_path
- name: Setup rvm
shell: "{{item}}"
with_items:
- \curl -sSL https://get.rvm.io | bash -s stable --rails
- chmod 755 /usr/local/rvm/scripts/rvm && /usr/local/rvm/scripts/rvm
- /usr/local/rvm/bin/rvm install 2.0.0-p451 --disable-binary
- cp /usr/lib/ruby/2.0.0/x86_64-linux-gnu/passenger_native_support.so /usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/x86_64-linux/passenger_native_support.so
- /usr/local/rvm/bin/rvm use ruby-2.0.0-p451
when: not rvm_path.stat.exists
I think I missed the command : passenger-config build-native-support
in the tasks, see this
http://stackoverflow.com/questions/35869809/compile-passenger-native-support-with-rvm-for-different-ruby-versions
Not tried on Centos yet, but if possible, give me access to your server to troubleshoot.
Really! Yes, it's possible. Just how do we do that?
ReplyDeleteIt would be a big thank you!
Or I can add you whatsapp , line , or something like that ?
ReplyDeletecontact me via
ReplyDeletehttps://docs.google.com/forms/d/1LMmZ9NapaIG-YKYc3kWwmvV9kkGC6m3nydCzDl5e0ZM/viewform