I've been messing around with both RubyOnRails3 and Git for the first time. Everything had been going along smoothly until all of a sudden any rails related command line argument stopped working. Unfortunately I have no idea what caused this or how to go about fixing it.
Here's the output from the command line
C:\railstest\railsproject>rails
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/lockfile_parser.rb
:48:in `parse_source': undefined method `[]' for nil:NilClass (NoMethodError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/lockf
ile_parser.rb:20:in `block in initialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/lockf
ile_parser.rb:14:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/lockf
ile_parser.rb:14:in `initialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/defin
ition.rb:43:in `new'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/defin
ition.rb:43:in `initialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/dsl.r
b:122:in `new'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/dsl.r
b:122:in `to_definition'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/defin
ition.rb:20:in `build'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler.rb:12
8:in `definition'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler.rb:11
6:in `load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler.rb:10
0:in `setup'
from C:/railstest/railsproject/config/boot.rb:8:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from script/rails:5:in `<main>'
I'm not exactly sure what other information to provide
The Undefined method for nil:NILClass occurs when you attempt to use a formula on a blank datapill. This indicates that the datapill was not provided any value at runtime.
What is an undefined method in Ruby? Undefined method call created a NoMethodError. This is a typical Ruby error that indicates that the method or attribute you are attempting to call on an object has not been declared.
It seems like there is some problem in the Gemfile.lock
file. You can try deleting this file and run bundle install
again to see if it can recreate it correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With