sqlite 3 error

26 views
Skip to first unread message

amritpal pathak

unread,
Jun 27, 2011, 3:17:28 AM6/27/11
to rubyonra...@googlegroups.com
I have installed Ruby on Rails .
 rails -v=>3.0.7
 gem -v=>1.3.6
 ruby -v=>ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]

                             when i tried to start the server by "rails s" or tried to do anything it gives the error 

Could not find gem 'sqlite3 (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.

Please somebody help me to get rid of it...:P

 Thanks in advance 



Chirag Singhal

unread,
Jun 27, 2011, 4:33:40 AM6/27/11
to rubyonra...@googlegroups.com
Do, what it says... run 'bundle install' on your app.
Or manually install sqlite3 gem

amritpal pathak

unread,
Jun 27, 2011, 12:26:59 PM6/27/11
to rubyonra...@googlegroups.com
On Mon, Jun 27, 2011 at 4:33 AM, Chirag Singhal <chirag....@gmail.com> wrote:
Do, what it says... run 'bundle install' on your app.
Or manually install sqlite3 gem

        I tried "bundle install" from app.I couldn't work too.error persists.

thanks 

Kevin

unread,
Jun 27, 2011, 4:16:06 AM6/27/11
to Ruby on Rails: Talk
Hi,

first you need to install sqlite3.
In Ubuntu: sudo apt-get install libsqlite3-dev

Second install the sqlite gem
gem install sqlite3-ruby

see here for example http://stackoverflow.com/questions/2305920/rails-3-can-not-find-sqlite3-ruby

I am not sure if rails 3 works with ruby 1.8.7 but I would recommend
you to switch to version 1.9.2 anyway

Teri Solow

unread,
Jun 27, 2011, 1:24:16 PM6/27/11
to rubyonra...@googlegroups.com
On Jun 27, 2011, at 1:16, Kevin wrote:
> I am not sure if rails 3 works with ruby 1.8.7 but I would recommend
> you to switch to version 1.9.2 anyway

Rails 3 and even 3.1.0rc4 work fine with ruby 1.8.7.

Make sure the place you will eventually deploy to supports Ruby 1.9.2 before switching. I just had to downgrade to deploy to Dreamhost because their passenger won't work with anything but 1.8.7.

--
Teri Solow
http://tekniklr.com

amritpal pathak

unread,
Jun 27, 2011, 1:26:12 PM6/27/11
to rubyonra...@googlegroups.com
On Mon, Jun 27, 2011 at 4:16 AM, Kevin <def...@googlemail.com> wrote:
Hi,

first you need to install sqlite3.
In Ubuntu: sudo apt-get install libsqlite3-dev

Second install the sqlite gem
gem install sqlite3-ruby

see here for example http://stackoverflow.com/questions/2305920/rails-3-can-not-find-sqlite3-ruby

I am not sure if rails 3 works with ruby 1.8.7 but I would recommend
you to switch to version 1.9.2 anyway

It worked.

   Thank you very much.

              one thing left .now i can start old rail app but it gives the error of rake when i did "rake db:create" 

  rake aborted!
You have already activated rake 0.9.2, but your Gemfile requires rake 0.8.7. Consider using bundle exec.

(See full trace by running task with --trace)


 thanks 

Kevin

unread,
Jun 27, 2011, 5:49:43 PM6/27/11
to Ruby on Rails: Talk
Teri you are right, ruby 1.8.7 works fine.

You can check with "gem list" which gems are installed. Probably you
have a newer version installed (0.9.2) as required in your Gemfile
(0.8.7).
So try running "bundle exec rake" instead of just rake.
See here for example: http://stackoverflow.com/questions/6205377/confused-with-rake-error-in-rails-3

I encourage you to use the ruby version manager. It enables you to
switch between different gem sets really easy and you can install
different gem versions for different projects.

On 27 Jun., 19:26, amritpal pathak <amritpalpath...@gmail.com> wrote:
> On Mon, Jun 27, 2011 at 4:16 AM, Kevin <def...@googlemail.com> wrote:
> > Hi,
>
> > first you need to install sqlite3.
> > In Ubuntu: sudo apt-get install libsqlite3-dev
>
> > Second install the sqlite gem
> > gem install sqlite3-ruby
>
> > see here for example
> >http://stackoverflow.com/questions/2305920/rails-3-can-not-find-sqlit...

Saikiran Mothe

unread,
Jun 27, 2011, 12:37:51 PM6/27/11
to rubyonra...@googlegroups.com
Hi,

try 

gem install sqlite3,

or

try this mysql db

rails my_new_app --database=mysql

Cheers,
Sai


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply all
Reply to author
Forward
0 new messages