Let's check your rails command on your Ruby path. If rails command is like below, that is still older one. For example, check /usr/bin/rails:
#!/usr/bin/ruby1.9
#
# This file was generated by RubyGems.
#
# The application 'rails' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0"
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
version = $1
ARGV.shift
end
gem 'rails', version
load Gem.bin_path('rails', 'rails', version)
You should copy latest command file from bin path on your gem directory to ruby path. For example, check the latest command file on /usr/lib/ruby/gems/1.9.1/bin/rails:
#!/usr/bin/env ruby1.9
#
# This file was generated by RubyGems.
#
# The application 'railties' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0"
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
version = $1
ARGV.shift
end
gem 'railties', version
load Gem.bin_path('railties', 'rails', version)
As you check these files, real substance of rails command moves from rails gem to railties gem, so that you should do below manually:
> sudo cp /usr/lib/ruby/gems/1.9.1/bin/rails /usr/bin/rails
And then, you could do same operations about /usr/lib/ruby/gems/1.9.1/bin/rackup.
No comments:
Post a Comment