Stylesheet link causing routing error

Hi - I think this is a simple 2.0 conversion issue. In my application
layout, I have a simple stylesheet link tag:

<%= stylesheet_link_tag 'application' %>

In my public/stylesheets directory, I have application.css

When my pages are rendered, I get:

Routing Error

27
No route matches "/stylesheets/application.css"
with {:method=>:get}

What am I doing wrong?

Thanks,
Dinohanks,
Dino

On Mar 18, 2008, at 10:10 AM, dino d. wrote:

Routing Error

27

No route matches "/stylesheets/application.css"
with {:method=>:get}

What am I doing wrong?

Thanks,
Dinohanks,
Dino

Do you really have a ‘stylesheets’ directory under your web server’s
document root? Normally for Rails apps this is #{RAILS_ROOT}/public/
stylesheets, but if your web server isn’t looking at RAILS_ROOT/public
then it’s going to give the Rails routing a shot.

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

Do you really have a ‘stylesheets’ directory under your web server’s
document root? Normally for Rails apps this is #{RAILS_ROOT}/public/

Thanks for the reply. Yes, I have a public/stylesheets directory off
my app root, not my ruby root. i.e. ruby/myapp/public/stylesheets/
application.css

Any other ideas?

Thanks again,
Dino

Is this just a development box? On some Rails hosts, css files are
proxied to a shared directory outside of Rails in the Apache config.

H

On Mar 18, 2008, at 11:48 AM, dino d. wrote:

Dino
Are you certain that your web listener (Apache? Mongrel? other?) is
looking at public/ as the document root? If you put an index.html
file there, is it shown for GET / to the server?

I saw in your original message that you had a public/stylesheets
directory, but what I’m asking is whether the rest of the system
(external to Rails) has a consistent view of the app structure.

-Rob

Rob B. http://agileconsultingllc.com
[email protected]n.invalid

I saw in your original message that you had a public/stylesheets
directory, but what I’m asking is whether the rest of the system
(external to Rails) has a consistent view of the app structure.

-Rob

I’m just in dev mode using webrick locally. The public dir has the
ruby standard index.html and it does indeed show up if i go to
localhost:3000/

Dino

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs