0

we have developed an rails project using rails 3 and mysql, it has images, css and javascript (jquery) and it is working fine in windows xp environment. But when i migrated the code to ubuntu, the images, css ( applies partially) and javascript (jquery) are not loading. i am running in development mode. I have included the js and css like this:

<%= stylesheet_link_tag "jquery-one", "ctlCalendar", "application", "jquery.treeview" %>
<%= javascript_include_tag "jquery-1.6.2.min", "jquery.rails", "jquery.treeview"%>

Here the error i am getting:

Started GET "/images/LoginImage.png" for 127.0.0.1 at 2011-08-13 01:02:04 +0900

ActionController::RoutingError (No route matches "/images/LoginImage.png"): 

Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.0ms)

Started GET "/Images/Back_Login.gif" for 127.0.0.1 at 2011-08-13 01:02:05 +0900

ActionController::RoutingError (No route matches "/Images/Back_Login.gif"):  

Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.1ms)

can anyone help me to solve this problem?

Thank You, Sudhir C.N.

1 Answer 1

1

Ubuntu, and other Linux versions, have case-sensitive file names, while Windows XP doesn't.

This means while LoginImage.png and loginimage.png are the same in Windows, they are not the same in Ubuntu. That's probably the cause of your problem.

The same applies to path names – /images and /Images are completely different paths in Linux, so make sure not to mix them up.

Sign up to request clarification or add additional context in comments.

5 Comments

thanks a lot, this solved the problem with css. but javascripts are not working... getting the error as: Started GET "/javascripts/all.js?1309252624" for 127.0.0.1 at 2011-08-14 03:52:34 +0900 - any idea abt this? ActionController::RoutingError (No route matches "/javascripts/all.js"): Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.9ms)
Again, check the exact file names in Linux, sometimes the case gets mixed up during deployment, e.g. the file is named all.JS or something instead of all.js. Make absolutely sure that the folders and file names are all in the correct case.
Btw, you might have accidentally used javascript_include_tag 'all' instead of javascript_include_tag :all, unless you actually have a JS named all.js.
no, i am using as <%= javascript_include_tag :all %>, even than i am getting this error: Started GET "/javascripts/all.js?1309252624" for 127.0.0.1 at 2011-08-14 04:40:56 +0900 ActionController::RoutingError (No route matches "/javascripts/all.js"): Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.8ms). Also, there is no file with all.js.
Are you using asset caching? The feature where multiple JS files are combined into one, by using :cache => true in your javascript_include_tag methods?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.