Reputation: 613
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?
Upvotes: 0
Views: 2451
Reputation: 1159
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
Upvotes: 0
Reputation: 306
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
Upvotes: 2
Reputation: 2786
Install the gem sqlite in your application and then try again.
Upvotes: 0