Could not find 'sqlite3-ruby' error in Ubuntu

Hi all, please help me:

First time I totally had to delete all ruby and Rails because of this
problem. How to solve it well?

The message is:
Could not find gem ‘sqlite3-ruby (>= 0, runtime)’ in any of the gem
sources.

Try running bundle install

I have Ubuntu Linux.
ruby -v = 1.9.2p0
gem -v = 1.3.7
rails -v = error message again, 2 hours ago it was “rails 3”

If I type “rails my_app” it does not work, if I type "rails new my:app,
it
works
, which means Rails 3 is running and working well if I want to
create
an app, but does not, if I want to use “rails server”.

I googled it, unfortunately not any updated and linuxbased answer which
I
could trust in.

gem environment” gives this:

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.7
  • RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
  • INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /usr/bin/ruby1.8
  • EXECUTABLE DIRECTORY: /usr/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-linux
  • GEM PATHS:
    • /usr/lib/ruby/gems/1.8
    • /home/vadkant/.gem/ruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

Why does it saygem path is 1.8 and ruby executable is 1.8 if I have
aready
1.9 and if I ask ruby -v it says 1.9?
How to update gem executables with sqlite3?

Thanks a lot!
Best wishes,
gezope

Try running bundle install

or

$ gem install sqlite3-ruby

2010/10/22 Gerő Zoltán [email protected]

I have Ubuntu Linux.

- x86-linux
 - http://rubygems.org/

“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to

[email protected][email protected]

.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


att: Luciano S.
http://www.lucianosousa.net
http://twitter.com/lucianosousa
*Ruby on Rails Developer
*Linux User #456387
*Contato: (21) 7639-5049

Hello, thanks for reply!

I found my Gemfile in the new Rails app, and commented out this line:
gem ‘sqlite3-ruby’, :require => ‘sqlite3’, and then I tried budnle
install.

Result was:

Installing sqlite3-ruby (1.3.1) with native extensions /usr/local/lib/
site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions’: ERROR:
Failed to build gem native extension.
(Gem::Installer::ExtensionBuildError)

/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 /usr/lib/ruby/gems/1.8/gems/sqlite3-
ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/
sqlite3/gem_make.out

Then I tried:
sudo gem install sqlite3-ruby

The result was:

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 /usr/lib/ruby/gems/1.8/gems/sqlite3-
ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/
sqlite3/gem_make.out

So I’m afraid the same. Why does it still looking for my gems under
1.8 if I have 1.9? How to use this mkmf file?

Thanks a lot,
gezope

Do you have sqlite3 installed?..

try
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby

I had the same problem. The article below helped me solve it.

http://rbjl.net/20-rubybuntu-2-troubleshooting-common-ruby-ubuntu-problems

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs