This is my bluehost environment:
# ruby --version
ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02
# rails -v
Rails 2.3.11
I need to upgrade the ruby and rails version, take a Live Chat with Bluehost support, the guy let me follow this post https://my.bluehost.com/cgi/help/rails but it just tell us how to deploy the rails, so I need to reinstall the rails.
Install Ruby 1.9
When I install RubyGems, it complains:
[~/src/rubygems-1.8.24]# ruby setup.rb
/home4/lytsingo/.local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
RubyGems 1.8.24 installed
so need to install libyaml first
# mkdir ~/src
# cd ~/src
# wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
# tar xvf yaml-0.1.4.tar.gz
# cd yaml-0.1.4
# ./configure -prefix=$HOME/.local
# make -j8
# make install
# make clean
*Note*: Let compile faster, I use make -j 8, it depends your cpu processors, see:
cat /proc/cpuinfo |grep processor |wc -l
8
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
# tar xvf ruby-1.9.3-p0.tar.gz
# cd ruby-1.9.3-p0
# ./configure -prefix=$HOME/.local --disable-install-doc --with-opt-dir=$HOME/.local
# make -j8
# make install
# make clean
Install gems
# wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
# tar xvf rubygems-1.8.24.tgz
# cd rubygems-1.8.24
# ruby setup.rb
Install Rails 3
gem install rails -v 3.2.8 --no-rdoc --no-ri
Check it out:
# ruby -v
ruby 1.9.3p0 (2011-10-30) [x86_64-linux]
# rails -v
Rails 3.2.8
Em, it looks so nice, enjoy!
9 replies on “Bluehost Rails 3.2.8 Ruby 1.9.3”
Thanks, this helped a lot!
Hello, I tried install 3.2.8 but when I run rails -v … I am still getting
# rails -v
Rails 2.3.11
Any idea on what is going on?
Also another issue that I am having is the following…..
[~/src/rubygems-1.8.24]# ruby setup.rb
ERROR: While executing gem … (Errno::EROFS)
Read-only file system – /usr/lib64/ruby/site_ruby/1.8/rubygems/gem_runner.rb
Thanks.
Did you succeed with installing it?
I’m getting the same issue as well..
use
# ruby setup.rb --prefix=$HOME/.gem
use
# ruby setup.rb --prefix=$HOME/.local
First of all, thanks for this is great post, I’m also on bluehost trying to upgrade from 1.8.7 to 1.9 – I followed your instructions, it worked till # cd rubygems-1.8.24. On # ruby setup.rb step, i encountered the following error – do you know whats the issue here?
-bash-4.1$ cd rubygems-1.8.24
-bash-4.1$ ruby setup.rb
ERROR: While executing gem … (Errno::EROFS)
Read-only file system – /usr/lib64/ruby/site_ruby/1.8/rubygems.rb
-bash-4.1$ ruby -v
ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02
-bash-4.1$
Did you succeed with installation?
Hey ,
Thank you for these instructions, I got ruby2.0 and latest ruby gem in bluehost. But when I do rails -v it still shows me the old version, that never happens when I do ruby -v which shows me 2.0 Can I get any help here ??