views:

86

answers:

1

I using the rails by Instantrails on windows.It can run well before I update the rails version to rails 3 . The error message is : E:\InstantRails-2.0-win\rails_apps\myproject>rails server E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/lo ckfile_parser.rb:48:in parse_source': undefined method[]' for nil:NilClass (N oMethodError) from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l ib/bundler/lockfile_parser.rb:20:in send' from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l ib/bundler/lockfile_parser.rb:20:ininitialize' from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l ib/bundler/lockfile_parser.rb:14:in each' from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l ib/bundler/lockfile_parser.rb:14:ininitialize' from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l ib/bundler/definition.rb:43:in new' from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l ib/bundler/definition.rb:43:ininitialize'

What cause this error? I found that answer,because the old version project can't run on the new version.

A: 

You're troubling the trouble by using a legacy environment like InstantRails for rails3.

InstantRails hasn't been updated for nearly 3 years and its latest version includes ruby 1.8.6 which is incomplatible with rails 3. From the official Ruby on Rails website:

We recommend Ruby 1.8.7 or Ruby 1.9.2 for use with Rails. Ruby 1.8.6 and earlier are not supported, neither is version 1.9.1

If you really insist on using windows as a development environment, the recommended way of getting rails 3 to work on Windows right now is to install ruby via the Windows installer: http://rubyforge.org/frs/?group_id=167 and then just install RubyGems by running its installation script and afterwards install rails3 as gem.

svilenv