Closed dec1 closed 8 years ago
P.S If I do the same with rvm instead of ruby-install & chruby rails is available afterwards .. ie seems to have been correctly installed
Seems to work fine if I do the following:
(1) Build ruby from source
(2) tell chruby about my custom ruby
Note: its not very elegant to have to edit the chruby.sh file for this (RUBIES=()
otherwise overwrites any env vars instead of adding to them! .. possible improvement?)
(3) Manually install nokogiri using sys libs (wont work otherwise)
gem install nokogiri -- --use-system-libraries
(4) chruby 2.2.3
(5)gem install ruby
things seem to work fine. rails gets built without errors and is available on the command line
rails --version
Rails 4.2.4
So maybe theres something that needs to be improved in ruby-install instead?
sudo does not inherit your current environment (specifically $PATH) for security reasons. Please try gem install rails
without sudo.
make sure you have
ruby-develinstalled.
In case someone struggles with OpenSuse:
# ruby 2.1.x
zypper in gcc make ruby2.1-devel ruby2.1-devel-extra
# or ruby 2.2.x
zypper in gcc make ruby2.2-devel ruby2.2-devel-extra
I have a problem installing a custom version of rails. Im using opensuse 13.2 (which has a system ruby 2.1 already installed) I installed “ruby-install” and “chruby” so that I could install and manage custom ruby/rails versions without affecting the system ones. Installing ruby 2.2.3 itself seemed to work fine. However when I try to install rails via gem, I get an error. Somehow the installation seems to be looking for files belonging to the system (2.1) ruby instead of the (active) 2.2.3.
I can install “ruby-devel” via yast (my system package manager) but it shows version 2.1
I don’t feel too comfortable with this since it corresponds to my system ruby version and not the custom one I installed (2.2.3)
If I nonetheless do so I can then install “nokogiri” manually (Workaround for problem with libxml libraries .. see http://stackoverflow.com/questions/29782968/how-to-gem-install-nokogiri-use-system-libraries-via-gemfile http://stackoverflow.com/questions/24251494/nokogiri-gem-installation-error)
Then finish rails installation
Seems to have worked but, I cant seem to find rails then…
Maybe I have to build ruby from source (should have the correct version of the headers then) and then tell “chruby” about it?
Any other ideas?
Any suggestions? Thanks in Advance. Declan