gravityblast / web-app-theme

A simple theme for web apps
Other
2.45k stars 387 forks source link

defaults.js Not Created #54

Open clint326 opened 12 years ago

clint326 commented 12 years ago

I'm rather new to Ruby on Rails and Web-App-Theme... and this is the first issue I've ever posted on Github.

When I try even the most basic Rails app with Web-App-Theme, it seems to me that defaults.js is not created. Here's how I tried (I'm using Rails 3.2.0):

rails new testapp
cd testapp
mate .

Then I edit the Gemfile to add the following: gem 'web-app-theme'

Note: adding "gem 'web-app-theme', '~> 0.8.0'" gave me errors about compatibility, so I just dropped the '~> 0.8.0' part and it worked.

bundle install
rails g scaffold Person name city
rails s

This seems to work fine when I visit http://localhost:3000/people

rails g web_app_theme:theme
rails s

When I go to http://localhost:3000/people I get an error message:

No such file or directory - Asset file not found at '/testapp/public/javascripts/defaults.js'

When I search the testapp directory, there is no file called 'defaults.js' anywhere.

Am I doing something wrong or is this a bug of some sort?

Thanks for your help.

clint326 commented 12 years ago

Okay, I see you have to replace:

<%= javascript_include_tag :defaults, :cache => true %>

with:

<%= javascript_include_tag 'application' %>

But, the pointers to the CSS files are still messed up.

Still looking for help.

lamfadadev commented 12 years ago

Having same issue, got past the js, but the CSS sill an issue. Any help appreciated.

rother commented 12 years ago

1) I left out the '~> 0.8.0' as well because it failed to install due to depending on Rails 3.1.x (I'm running 3.2.x) 2) The problem seems to be that the asset pipeline isn't supported. You can turn it off by changing config.assets.enabled in config/application.rb from true to false. 3) Change the javascript_include_tag to 'application' as suggested above and it should work ...alas you won't have asset pipelineing

keessonnema commented 12 years ago

that didn't work for me :( i still get this error:

No such file or directory - Asset file not found at 'C:/pro-app/public/javascripts/C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-rails-2.0.2/vendor/assets/javascripts/jquery.js'

hope someone can help us with this problem.

knoguchi commented 11 years ago

move public/stylesheets/web-app-theme to app/assets/stylesheets/web-app-theme Then, edit the app/views/layout/application.erb. replace the path with 'application', just like the above for javascript. <%= stylesheet_link_tag "application", :media => "all" %>

Voila! it works again.

knoguchi commented 11 years ago

Also move public/images/web-app-theme to app/assets/images/web-app-theme. So, basically Rails3.2 asset pipeline moved them from public/* to app/assets/*

erick2red commented 11 years ago

Changing the line in application.html.erb worked for me. No css errors.

daniellqueiroz commented 11 years ago

Thanks knoguchi, it works!

djberg96 commented 11 years ago

Followed the instructions here from knoguchi, worked great. Wonder if we can get an update.

anhkt commented 7 years ago

Hello every one.!!! please, help me. When I change from 'default' to 'application'. My website didn't work. When I change from 'application' to 'default', it work, but it note: GET http://localhost:3000/javascripts/default.js and: GET http://localhost:3000/stylesheets/default.css Thank so much...