Tuesday, 19 April 2011

Ruby Debug for Rails3

                     gem 'ruby-debug19'   #for ruby 1.9
instead of   #gem 'ruby-debug'

I tried to put ruby-debug gems for my rails app,
  gem 'ruby-debug'

and it turned up as an error:
Installing linecache (0.43) with native extensions /home/wei/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /home/wei/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb
Can't handle 1.9.x yet


After changing to ruby-debug19, it works.
Installing linecache19 (0.5.12) with native extensions

Wednesday, 13 April 2011

Environment for Rails 3

Today, I like to create a new rails 3 application from scratch.

First, i need to setup a new environment. RVM is a handy tool to manage ruby environment for rubygems to gemset. My PC has RVM already installed, the next step would be installing ruby (current stable version of ruby is 1.9.2) and rails 3.

rvm install 1.9.2
rvm use 1.9.2
gem install bundler
gem install rails