rails generate rspec:install config/environments/development.rb:1:in ` top (required) ': undefined method `configure'
In config/environments/development.rb:
change
Rails.application.configure do
to
SampleApp::Application.configure do
I checked a couple of my applications, and thats the format I have them.
Undefined method error when running rails generate rspec:install
Thanks, ok change the first line to
SampleApp::Application.configure do
Looks like you missed the double ::
.
Credit to this S.O. answer.
`rails new`: different behaviour in Linux and Windows
OK, my mistake was copy-pasting the contents of a Gemfile from the project I was writing in Windows. The Gemfile in Windows had the following line:
gem 'rails', '4.0.4'
whereas the line in the original Gemfile generated by rails new
in the linux box was:
gem 'rails', '4.1.1'
Therefore I was having version mismatch problems. Now I have copy-pasted the contents of the Gemfile from Windows but preserving the line gem 'rails', '4.1.1'
and it works.
Related Topics
Convert an Array to Hash, Where Keys Are the Indices
Ruby - Keyword Arguments - Can You Treat All of the Keyword Arguments as a Hash? How
How to Sort Authors by Their Book Count with Activerecord
How to Make Carrierwave Delete the File When Destroying a Record
Ruby Open-Uri Redirect Forbidden
How to Test Code Coverage for Rails Erb Templates
Printing Qr Codes Through an Esc/Pos Thermal Printer
Rails - Multiple Top Level Domains and a Single Session/Cookie
Accessing Objects Memory Address in Ruby
Ruby on Rails Upload File Problem Odd Utf8 Conversion Error
Why Is "Wsdl" Namespace Interjected into Action Name When Using Savon for Ruby Soap Communication
Why Does Ruby on Rails Use Http://0.0.0.0:3000 Instead of Http://Localhost:3000
Rails: Dynamic Columns/Attributes on Models