Using RubyGems on an ubuntu server

I installed Ruby on Rails on my Ubuntu 10.04 Server with the official guide: https://help.ubuntu.com/10.04/serverguide/C/ruby-on-rails.html

But I have some problems with this. Please help me!

1) I can’t install ANY gem!

sudo gem install sqlite3-ruby

returns

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

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

Gem files will be installed in / var / lib / gems / 1.8 / gems / sqlite3-1.3.3 for verification. Results recorded in / var / lib / gems / 1.8 / gems / sqlite3-1.3.3 / ext / sqlite3 / gem_make.out

2) When I try to get the version of Rails with the command

rails -v

The server prints:

getopt: - 'v' ...

+3
2

, sqlite3 . , . :

sudo apt-get install libsqlite3-dev

,

rails --version

.

+1

Source: https://habr.com/ru/post/1790341/


All Articles