Problem installing compass rubygem

Web hosting discussion, programming, and shared and dedicated servers.
2 posts Page 1 of 1
by jhudgins » Wed Dec 26, 2012 1:18 pm
(re-posting an earlier E-mail at Support's suggestion)

I need to use the compass rubygem on the Sonic Web server to permit Sass/Compass CSS translations. It's not installed by default, but a lot of recent responsive design frameworks use it. I thought I'd do a local installation of it, as I've recently done at Pair and BlueHost, but found that the installed version of the gem feature itself is too old:

$ gem install compass
Attempting local installation of 'compass'
Local gem file not found: compass*.gem
Attempting remote installation of 'compass'
Updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302

That error is indicative of a fairly old version; and indeed:

$ gem --version
0.8.11

I understand that Sonic's running an emulated version of Ruby, but the sass/compass preprocessors are used only during production and speed isn't critical. Would Ops be willing to update the version of rubygems? It should require only this:

$ gem update --system

though occasionally one might have to fall back to this:

$ gem install rubygems-update
$ update_rubygems

Failing a system-wide update, might you arrange for me to install a more recent copy of gem locally? This is a supported mode of operation, and recent versions of gem will do it automatically. However, when I tried to set it up manually at Sonic, I couldn't get beyond the error below:

$ wget http://rubyforge.org/frs/download.php/7 ... 1.8.24.tgz
$ tar zxf rubygems-1.8.24.tgz
$ cd rubygems-1.8.24
$ mkdir $HOME/.gem
$ export GEM_HOME=$HOME/.gem/gems
$ ruby setup.rb --prefix=$HOME/.gem
$ cd
$ export PATH=$HOME/.gem/bin:$PATH
$ which gem
/home/j/jhudgins/.gem/bin/gem
$ gem --version
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': no such file to load -- rubygems/exceptions (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
from /home/j/jhudgins/.gem/bin/gem:19

Anyone have suggestions/advice on this? I'm not a frequent Ruby user and may well be doing something wrong here. Thanks.
by jhudgins » Fri Jan 04, 2013 3:41 pm
To follow-up my own post, Ops has kindly upgraded rubygems and I'm now able to install the compass gem locally. For reference, here are the steps required.

$ cd
$ mkdir -p .gem/ruby/1.8
$ export GEM_HOME=$HOME/.gem/ruby/1.8
$ gem install compass
Fetching: sass-3.2.4.gem (100%)
Fetching: chunky_png-1.2.6.gem (100%)
Fetching: fssm-0.2.9.gem (100%)
Fetching: compass-0.12.2.gem (100%)
Successfully installed sass-3.2.4
Successfully installed chunky_png-1.2.6
Successfully installed fssm-0.2.9
Successfully installed compass-0.12.2
4 gems installed
Installing ri documentation for sass-3.2.4...
Installing ri documentation for chunky_png-1.2.6...
Installing ri documentation for fssm-0.2.9...
Installing ri documentation for compass-0.12.2...
Installing RDoc documentation for sass-3.2.4...
Installing RDoc documentation for chunky_png-1.2.6...
Installing RDoc documentation for fssm-0.2.9...
Installing RDoc documentation for compass-0.12.2...
$ export PATH=$GEM_HOME/bin:$PATH

The definitions of GEM_HOME and PATH go in .profile as well, of course.
2 posts Page 1 of 1

Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 14 guests