Set up Ruby
- Windows 7 x64
- Ruby 2.0
Download from Web
In windows, RubyInstaller is available, this is easy to install Ruby.
After downloading, just click rubyinstaller-x.x-pxxx.exe(in case of x64, please select x64)
Check second, add PATH is useful for us.
Check whether the installation succeeds or not
Open command prompt(cmd.exe)
Rails require Devkit and its PATH
Devkit is toolset. Maybe, create folder under c:\Devikit and extract Devkit-sxf.exe under it
And this path to PATH
Go Devkit folder and type
This is initialization
ruby dk.rb init
Next is install
ruby dk.rb install
Skip install doc
Add some setting for gem.
By default, gem installs all documentation. That takes a lot of time.:x
To skip install doc, create .gemrc file under c:Users\<username>(Windows 7)
install: --no-ri --no-rdoc update: --no-ri --no-rdoc
Ruby reads this file and set gem setting
Install Rails using gem
Type following command under cmd.exe
gem install rails
If there are no error, works fine.
Rails version should be shown
In my opinion, please create new folder for Rails
Create new application
rails new applicationname
applicationname is your application name.(No rules)
rails new command create Rails Application set(files)
※If you want to use mysql(Default database is sqlite3, which is installed under Ruby)
rails new applicationname -d mysql
Go Application folder and type
Ruby has WEBrick server for development. This command invokes WEBRick server
By default, port is 3000
※If you use x64 version, sqlite3 error has occured
By default rails use 32bit sqlite3 version by default
Please open Gemfile.lock and edit
1.3.8 is your version in Ruby
To fix, installation version(require gems) Try it!
Stop Rails Application
Ctrl + S
Install Eclipse and Install Aptana
Install Eclipse is very straight.
“Help” -> “Install New Software”
Start install and restart eclipse
Create new Application
Rails new command starts automatically, and create new Rails Application.
At the bottom, Rails console opens and you can input rails command in here.