0

I am new to RoR and when I go try the rails server command I get this strange error message:

/Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
    from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `rescue in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:2:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `block in require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:131:in `require'
    from /Users/danielmiller/Desktop/railsTutorbook/myfirstapp/config/application.rb:7:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:74:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:74:in `block in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

Can anyone help with that?

2
  • May I know your version of Ruby?? Commented Jan 16, 2014 at 6:50
  • And don't forget rake db:create Commented Jan 22, 2016 at 12:39

3 Answers 3

2

it looks like the sqlite3 ruby gem is having some trouble.

first, make sure you have the libsqlite3 development package installed.

On a debian derivitive, this would look like

sudo apt-get install libsqlite3-dev

then, install the gem

gem install sqlite3

on a normal rails setup, bundler should be setup via Gemfile to install all the required gems for you.

bundle install
Sign up to request clarification or add additional context in comments.

1 Comment

hey, I thought this would get me somewhere but even after successfully installing sqlite3 I still get the same error message /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
0

Install the gem sqlite in your application and then try again.

Comments

0

Reinstall the rails . Are you having two different version of ruby?

please update latest Ruby-gems using

gem update

I would recommend you to reinstall the rails using the below command,

 gem install rails

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.