I've been playing with Ruby on Rails in Windows for some weeks and now I want to move to Linux, which I prefer as my development environment. In both machines, I've created a demo application by running:
rails new demo
Then, in order to install Rspec, I added the appropriate gem into the Gemfile and ran bundle install
. In both machines this process succeeded. However when I ran rails generate rspec:install
, the process failed in Linux. After browsing StackOverflow I found the issue I was actually facing: rails generate rspec:install config/environments/development.rb:1:in <top (required)>': undefined method
configure'.
According to the accepted solution to the question above, the problem is that the first line in development.rb
was:
Rails.application.configure do
when it should have been...
Demo::Application.configure do
I noticed that rails new demo
in Windows correctly generates the development.rb
file, but in Linux doesn't. Why does it happen? The only difference I see is that the Rails version in my Linux box is 4.1.1 whereas in the Windows box is 4.0.4. Provided that the version in Linux is newer than the version in Windows, does it mean that RSpec installation is broken for Rails 4.1.1? Is there any other reason for this different behaviour to occur?
Thank you.