Archive for the ‘Ruby on Rails’ Category

Ruby on Rails: RubyGem version error: rack(1.0.0 not ~> 1.0.1) (RuntimeError)

February 16, 2010

Error Message:

/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:271:in `require_frameworks’: RubyGem version error: rack(1.0.0 not ~> 1.0.1) (RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:134:in `process’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run’
from /home/malathi/open/blog/config/environment.rb:9
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/generate.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
from script/generate:3


# gem uninstall rack

Select gem to uninstall:
1. rack-1.0.0
2. rack-1.1.0
3. All versions
> 1
You have requested to uninstall the gem:
actionpack-2.3.5 depends on [rack (~> 1.0.0)]
actionpack-2.3.4 depends on [rack (~> 1.0.0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]  y
Successfully uninstalled rack-1.0.0

# gem install -v=2.3.5 rails
Successfully installed rack-1.0.1
1 gem installed
Installing ri documentation for rack-1.0.1…
Installing RDoc documentation for rack-1.0.1…

It works…….


Ruby on Rails installation on Fedora

October 30, 2009

Required for installations:

Development tools :

First, let’s check to see if you have the basic set of development tools — gcc, make and git. Although these tools are installed as part of the “Software Development” package, you can check if they are on your system by running ‘which gcc make git‘ at the command line.

# which gcc make git

If the tools are not on your system,then you can install them by running the following command.
# yum install gcc make git


A typical Rails application is backed by a relational database.We will install both MySQL (v5.0.77) and SQLite (v3.5.9) for our environment. Recent versions of Rails default to using SQLite.  If set up on your system, however, MySQL is also easily used.

# yum install mysql-server mysql-libs mysql-devel
# yum install sqlite sqlite-devel

Ruby language:

Install the core packages for Ruby (v1.8.6.287). We’ll also need the two packages ruby-mysql and ruby-sqlite3 for database access from Ruby programs.

# yum install ruby ruby-devel ruby-libs ruby-mode ruby-rdoc
  ruby-irb ruby-ri ruby-docs ruby-mysql ruby-sqlite3


RubyGems is the packaging system for Ruby applications and libraries.  Each application or library is known as a gem.

# wget -q
# tar xzf rubygems-1.3.2.tgz
# cd rubygems-1.3.2
# ruby setup.rb


Now that we have a sparkling RubyGems toolset, the first gem we are going to install is the Rails (v2.3.2) web application framework.An advantage of installing Rails using the gem command is that package dependencies are resolved automatically.

# gem install rails