3
votes

I have installed Ruby on Rails on my Ubuntu 10.04 Server by official tutorial: https://help.ubuntu.com/10.04/serverguide/C/ruby-on-rails.html

But I have some troubles with it. Please, help me!

1) I can't install ANY gem!

sudo gem install sqlite3-ruby

returns

ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb extconf.rb:3:in `require': no such file to load -- mkmf (LoadError) from extconf.rb:3

Gem files will remain installed in /var/lib/gems/1.8/gems/sqlite3-1.3.3 for inspection. Results logged to /var/lib/gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out

2) When i'am trying to get Rails version by command

rails -v

Server prints:

getopt: invalid option -- 'v' Terminating...

2

2 Answers

1
votes

Consider going through and making sure your sqlite3 libraries are installed. It looks as though you may be missing the required dependencies to build your gem. In this case you might try running this before installing your gem:

sudo apt-get install libsqlite3-dev

Also, try

rails --version

instead.

3
votes

If you are not set on using the packages in the Ubuntu repos(and I see no reason why you'd be), I'd suggest following this guide:

http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you