After not having great success with RoR on MT, I decided to try another host. I had looked at ASO before and their small packages fit the bill. After requesting shell access I was adding my repo and ready to go. However, I needed certain gems added and as with most shared hosting couldn’t just gem install xxx and be on my way. So I set out to try a Site5 method of using my local gems.
Here are the gems installed locally on my AOS server:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | *** LOCAL GEMS *** actionmailer (2.0.2, 1.3.6, 1.3.3) actionpack (2.0.2, 1.13.6, 1.13.3) actionwebservice (1.2.6, 1.2.3) activerecord (2.0.2, 1.15.6, 1.15.3) activeresource (2.0.2) activesupport (2.0.2, 1.4.4, 1.4.2) acts_as_ferret (0.4.3) avatar (0.0.5) builder (2.1.2) colored (1.1) fcgi (0.8.7) feedtools (0.2.26) ferret (0.11.6) hoe (1.5.1) hpricot (0.6) mime-types (1.15) mysql (2.7) rails (2.0.2, 1.2.6, 1.2.3) rake (0.8.1, 0.7.3) RedCloth (3.0.4) redgreen (1.2.2) rflickr (2006.02.01) rmagick (1.15.10) rubyforge (0.4.5) rubygems-update (1.1.1, 1.0.1) sources (0.0.1) tzinfo (0.3.8) uuidtools (1.0.3, 1.0.1) youtube-g (0.4.1) |
I needed, to start, sqlite3-ruby. Here’s the steps I took.
Create your gems directory.
cd mkdir gems
Now you need to find out your home path and local gem installation path:
pwd
gem environmentNote the values, you’ll need them for the next step. Create a .gemrc file in your home directory.
nano .gemrc# Add what is below gemhome: /home/yourusername/gems gempath: - /home/yourusername/gems - /usr/local/lib/ruby/gems/1.8
Verify that gem environment has changed.
gem environment
Should yield:
RubyGems Environment:
- RUBYGEMS VERSION: 1.1.1
- RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/yourusername/gems
- RUBY EXECUTABLE: /usr/local/bin/ruby
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/yourusername/gems
- /usr/local/lib/ruby/gems/1.8
...Edit your .bash_profile to reflect the changes.
nano .bash_profile
# Add the following export GEM_PATH=/home/yourusername/gems:/usr/local/lib/ruby/gems/1.8 export GEM_HOME=/home/yourusername/gems
Then from the console, type:
export GEM_PATH=/home/yourusername/gems:/usr/local/lib/ruby/gems/1.8 export GEM_HOME=/home/yourusername/gems
Verify it:
echo $GEM_PATH echo $GEM_HOME
Install gem*:
gem install sqlite3-rubyWatch the server barf:
Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb install sqlite3-ruby -y checking for sqlite3.h... no make make: *** No rule to make target `ruby.h', needed by `sqlite3_api_wrap.o'. Stop.
Install another gem:
gem install RedClothNo problem.
STATUS: Works for me.
* Tech support added the sqlite3-ruby gem for me. They rock!.
Leave a Reply