From: Panagiotis Atmatzidis Date: 2013-06-01T03:16:38+09:00 Subject: Re: Installing Ruby & Rails on Ubuntu 12 Hello, On 31 Μαϊ 2013, at 19:44 , "J. V." wrote: > I have been trying to install Ruby on Rails and get an environment > working for about 10 hours now. > > I inherited a project from an employee who left; a projected checked out > from SCCM but no instructions on how to setup Ruby on Rails or what to > deploy etc so started googling around. > > I found so many articles about the right way and the wrong way and some > were adamant that I listen to no one else, and after following those > instructions things still failed. > > I think I have worked out most problems. > > --- > $ruby -v > reveals > > ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux] > > When I attempt to hit an URL: http://localhost:8080/rcgi/Some.rb > > I get in the output that a module 'money' is needed. > > so I run > $sudo gem install money > > this is the output I receive: > > --- > Successfully installed dbd-sqlite3-1.2.5 > 1 gem installed > Installing ri documentation for dbd-sqlite3-1.2.5... > Installing RDoc documentation for dbd-sqlite3-1.2.5... > ERROR: Error installing money: > money requires Ruby version >= 1.9.2. > > --- > WTF? > > > I just did a $ruby -v and saw that I had Ruby 1.9.2 installed. > Also why do I get these first two lines (everytime I run this gem > install money command?: > > wtf>Successfully installed dbd-sqlite3-1.2.5 > wtf>1 gem installed > wtf>Installing ri documentation for dbd-sqlite3-1.2.5... > wtf>Installing RDoc documentation for dbd-sqlite3-1.2.5... > > If I run $sudo gem install money, I get those lines again. WTF? > > --- > How do I get 'money' installed? Why doesn't money work with 1.9.3 or > 1.8.7 for that matter? > [...] I'm not sure what's going on but try running sudo ruby prog ... When installing gems with sudo ruby probably uses a different directory to store your gems. Most people here use rvm, rbenv or chruby to get over issues with sudo and use ruby at user-level. You should try one of these, to get through these annoyances once and for all. Note that in order to install sqlite under ubuntu you need sqlite headers. Best Regards, ps. I use rvm but people at #ruby@freenode talk a great deal about rbenv you should try it https://github.com/sstephenson/rbenv Panagiotis (atmosx) Atmatzidis email: atma@convalesco.org URL: http://www.convalesco.org GnuPG ID: 0x1A7BFEC5 gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5 -- The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."