It sounds like whatever webserver you're using on the Production
machine (eg Apache, Nginx, etc) isn't actually handling the requests
for the requests for the static javascripts/stylesheets. In the case
of Apache (I don't have any real experience with anything else), make
sure that Options +FollowSymLinks is in your .htaccess or your vhost
container, and also depending on what Ruby app server you're using,
the appropriate rewrite directives are in place to only pass requests
to the app server for URI's that *do not* exists.

If you need more precise help, what web server and Ruby app server are
you using on the production server?

On May 6, 5:23 pm, Freddy Andersen <fre...@cfandersen.com> wrote:
> Why are the stylesheets and javascripts directories symbolic links on
> production?
>
> On May 6, 12:46 pm, Sj Tib <rails-mailing-l...@andreas-s.net> wrote:
>
> > Folks,
>
> > I am a little lost on a Routing error in accessing my javascripts and
> > stylesheets files on production and hopefully someone can help me.
>
> > Part of what is confusing me is that the same code that works fine on my
> > XP dev box is giving this Routing error when I put it up on the hosting
> > site in production environment. The only difference being the
> > environment itself (prod vs. dev) and that the javascripts and
> > stylesheets directories are symbolic links on production instead of
> > actual directories as on my local dev box.
>
> > For files like "/javascripts/path/to/my.js" and "/stylesheets/myapp.css"
> > I get error message like
>
> > ActionController::RoutingError (No route matches
> > "/stylesheets/myapp.css" with {:method=>:get}):
> > /vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisa 
> > tion.rb:66:in
> > `recognize_path'
>
> > I have looked at the routes.rb (included below) long enough but can't
> > see what is causing this Routing error.
>
> > I also started up a script_console and after loading up
> > ActionController::Routing::Routes in a variable the recognize_path for
> > "stylesheets/myapp.css" fails with the same error but it brings up the
> > page fine on that dev box without any errors - which is a little
> > confusing as well.
>
> > Here is what I have in my routes.rb
>
> >   map.resources :users, :collection => { :resetpwd => :get, :getnewpwd
> > => :get, :getpwdresetcode => :post }
>
> >   map.resource :session, :controller => 'session', :collection => {
> > :welcome_home => :get}
>
> >   map.root :controller => 'session', :action => 'new'
> >   map.activate '/activate/:activation_code', :controller => 'users',
> > :action => 'activate', :activation_code => nil
> >   map.resetpwd '/resetpwd/:resetpwd_code', :controller => 'users',
> > :action => 'resetpwd', :resetpwd_code => nil
> >   map.signup '/signup', :controller => 'users', :action => 'new'
> >   map.login '/login', :controller => 'session', :action => 'new'
> >   map.logout '/logout', :controller => 'session', :action => 'destroy'
>
> >   map.connect ':controller/:action/:id'
> >   map.connect ':controller/:action/:id.:format'
>
> > Sounds like I am missing something simple.
>
> > Appreciate any thoughts/pointers.
>
> > Thanks,
> > -S
> > --
> > Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to