How do i install Ruby on Rails in my PC ....can someone please let me know the files to be downloaded and installation procedures.
A:
- Download RubyInstaller 1.8.7 from here. During the installation, check the 'Add Ruby executables to your PATH' box. After the installation, don't forget to restart
cmd
. Tryruby -v
andgem -v
to check for installed Ruby and RubyGems and ensure they are work; - Install the latest stable Rails release:
gem install rails
and check it usingrails -v
; - Create a new application using
rails myapp
; cd myapp
, runscript/server
, and develop, develop, develop.
floatless
2010-09-10 05:24:15
I did not follow Step 3 and Step 4 .....do we just need to give rail application name ???? and how to run script/server
Sanjai Palliyil
2010-09-10 05:26:11
Yeah, you need to assign some name to your Rails application. You can find more information regarding the `rails` command line utility using `rails --help`. `rails` in Rails 3 will show `rails new APP_PATH [options]`, so you should launch it like `rails new hello_world_app`.
floatless
2010-09-10 05:31:48
Ok i have created a sample application. how do i view it in browser...sorry for my ignorance....just started with this.......
Sanjai Palliyil
2010-09-10 05:37:59
Change your working directory `cd your_app_name`, type `script/server`, wait a little bit (Ruby and Rails are slow on Windows), and point your browser to `localhost:3000`.
floatless
2010-09-10 05:40:27
When i started the server i got the error message, Could not find gem mysql2 in any of the gem sources...!!!!
Sanjai Palliyil
2010-09-10 05:50:41
You should try to install it using `gem install mysql2` or replace it in your Gemfile to `mysql`, then `bundle install` and try to run the server again.
floatless
2010-09-10 06:01:55
I have created a sample Ruby Application. Now i would like to connect to a database and start working on it. Somebody please help me on the steps to follow.
Sanjai Palliyil
2010-09-10 06:45:05
A:
Hi Sanjai Palliyil
Try these
Installing ruby - http://digit.lk/ruby_february2009 Installing rails - http://digit.lk/09_april_ruby
cheers
sameera
sameera207
2010-09-10 15:27:03