./spec/requests/layouts_spec.rb:7:in `block (3 levels) in <top
(required)>’
My layouts_spec.rb looks like the following:
require ‘spec_helper’
describe “Layouts” do
describe “GET /layouts” do
it “works! (now write some real specs)” do
# Run the generator again with the --webrat flag if you want to
use webrat methods/matchers
get layouts_path
response.status.should be(200)
end
end
end
Does anyone have an idea of the problem? Thanks in advance for any
replies. Cheers.
users_new GET /users/new(.:format) users#new
signup /signup(.:format) users#new
contact /contact(.:format) pages#contact
about /about(.:format) pages#about
help /help(.:format) pages#help
root / pages#home
pages_home GET /pages/home(.:format) pages#home
pages_about GET /pages/about(.:format) pages#about
pages_contact GET /pages/contact(.:format) pages#contact
pages_help GET /pages/help(.:format) pages#help
I’m running through a tutorial and I’m not sure I have defined the
layouts path yet.
You would need to specify this in your routes.rb file. If you post a
link
to the tutorial you are using, we can help you figure out where in the
tutorial it has you defining that path.
I’m having a hard time finding the Ruby on Rails 3 Tutorial online. Is
there a different avenue of trouble shooting for this error? The local
variable in layouts_spec.rb is layouts_path and I’ve looked back through
the book for the layouts_spec.rb file but have found nothing.
Should I just remove this file or move it to a different location?
Is this a necessary file? I removed it and the page still functions and
the tests pass.
I’m just curious where the file came from because I assume it was auto
generated and if removing it will be a problem or cause errors later on
down the line?
I’m having a hard time finding the Ruby on Rails 3 Tutorial online.
I believe the link I provided is to that tutorial.
I’m just curious where the file came from because I assume it was auto
generated and if removing it will be a problem or cause errors later on
down the line?
Well I certainly have not idea where it came from. Are you using git
(or similar) for version control of your code? If not then you should
be. Then you would know when it was created. The file certainly
looks like something you do not want since you have no model called
Layout, and I suspect it would be a bad idea to have one. Just delete
it and carry on.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.