rails installation error

2 views
Skip to first unread message

chinmaya joshi

unread,
Dec 25, 2010, 3:47:57 AM12/25/10
to rubyonra...@googlegroups.com
I have installed Ruby 1.8.7 and rails 3.0.3 on ubuntu 10.04.
i am following the steps given in the book 'Agile web development with rails' and i am new to the world of ruby on rails.

just after entire installation i have created a rails application called 'demo'

however when i enter the command ........ruby script/server     i get the following error:
Could not find gem 'sqlite3-ruby (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
Try running `bundle install`.


I have already installed mysql database.


Thanks,
Chinmaya Joshi


Butu

unread,
Dec 25, 2010, 6:21:13 AM12/25/10
to rubyonra...@googlegroups.com
Hi,

By default Rails will work well with embeded sqlite3 database.

so simple run
bundle install
it will solve your problem.

In case you want to work with mysql. You need to add "gem mysql" in the Gemfile. And then run "bundle install"
Also you may need to change the database config file.

Thanks!
Butu



--
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.

chinmaya joshi

unread,
Dec 25, 2010, 7:16:53 AM12/25/10
to rubyonra...@googlegroups.com
yes dis did solve the problem .....BUT  
When i type..: ruby script/server.........i get the error that directory cant be found
However when i i type........: rails server..........it gets me to the localhost server..........http://localhost:3000....displaying congratulations! you are riding ruby on rails
Now which one is right?
As the book says........ruby script/server

Colin Law

unread,
Dec 25, 2010, 12:09:45 PM12/25/10
to rubyonra...@googlegroups.com
On 25 December 2010 12:16, chinmaya joshi <jchin...@gmail.com> wrote:

Please don't top post, it makes it difficult to follow the thread.
Insert your reply into the previous post at appropriate points.
Thanks.

> yes dis did solve the problem .....BUT
> When i type..: ruby script/server.........i get the error that directory
> cant be found
> However when i i type........: rails server..........it gets me to the
> localhost server..........http://localhost:3000....displaying
> congratulations! you are riding ruby on rails
> Now which one is right?
> As the book says........ruby script/server

That is because you are using a Rails 2.3 book with Rails 3. You want
edition 4 of the book, or use the tutorial at railstutorial.org.

Colin

chinmaya joshi

unread,
Dec 25, 2010, 12:32:13 PM12/25/10
to rubyonra...@googlegroups.com
Thank you Colin.
Do you have any link where i will get the 4th edition of the book for download?


Colin Law

unread,
Dec 25, 2010, 12:42:29 PM12/25/10
to rubyonra...@googlegroups.com
On 25 December 2010 17:32, chinmaya joshi <jchin...@gmail.com> wrote:
> Thank you Colin.

A repeat:


Please don't top post, it makes it difficult to follow the thread.
Insert your reply into the previous post at appropriate points.
Thanks.

> Do you have any link where i will get the 4th edition of the book for
> download?

Google led me to
http://pragprog.com/titles/rails4/agile-web-development-with-rails in
about ten seconds.

Colin

Reply all
Reply to author
Forward
0 new messages