css3buttons_rails_helpers
css3buttons_rails_helpers copied to clipboard
no icons in assets/css3buttons with rails 3.1.1 and 1.0.1 Gem Version
Started GET "/assets/css3buttons/css3buttons/icons.png" for 127.0.0.1 at 2011-10-12 16:17:38 +0800 Served asset /css3buttons/css3buttons/icons.png - 404 Not Found (50ms)
ActionController::RoutingError (No route matches [GET] "/assets/css3buttons/css3buttons/icons.png"):
I confirm it. I have the same problem.
+1 this pull fixes it https://github.com/johnrees/css3buttons_rails_helpers/commit/46fd008d84feb43149fe9de7f27b8d5cf5a888fc
Same problem, please merge :+1:
Same problem.
+1
@johnres: I tried your branch, but icons are still not showing, so at least it's not working for me (I am just starting out with the asset pipeline, so its very possible I am doing something wrong).
With the 1.0.1 release gem the error I see in the log is:
Started GET "/css3buttons/icons.png" for 127.0.0.1 at 2011-10-27 09:17:33 -0700
ActionController::RoutingError (No route matches [GET] "/css3buttons/icons.png"):
Hmm, it's working here, is this how your Gemfile looks?
gem 'css3buttons', :git => 'git://github.com/johnrees/css3buttons_rails_helpers.git'
This asset pipeline is giving me a headache!
I tried:
gem 'css3buttons', :git => 'git://github.com/johnrees/css3buttons_rails_helpers.git',
and
gem 'css3buttons', :git => 'git://github.com/johnrees/css3buttons_rails_helpers.git', :branch => 'patch-1'
And still get no icons. I can see in the log that the asset is being compiled again:
Started GET "/assets/admin/admin.css" for 127.0.0.1 at 2011-10-27 09:30:04 -0700
Compiled admin/admin.css (9ms) (pid 79880)
Served asset /admin/admin.css - 200 OK (30ms)
However, the generated css (which includes the css3buttons css) does not correctly reference the image:
.button.icon:before {
content: "";
position: relative;
top: 1px;
float:left;
width: 12px;
height: 12px;
margin: 0 0.75em 0 -0.25em;
background: url(/css3buttons/icons.png) 0 99px no-repeat;
}
I appreciate your help in getting this working.
Thanks,
Ylan Segal [email protected] Tel: +1-858-224-7421 Fax: +1-858-876-1799
On Oct 27, 2011, at 9:22 AM, John Rees wrote:
Hmm, it's working here, is this how your Gemfile looks?
gem 'css3buttons', :git => 'git://github.com/johnrees/css3buttons_rails_helpers.git'
Reply to this email directly or view it on GitHub: https://github.com/thetron/css3buttons_rails_helpers/issues/23#issuecomment-2545694
Are any of your assets precompiled? Try running
rm -rf public/assets/*.css
Then look at
/assets/css3buttons/styles.css?body=1
and see if it has changed
background: url(/css3buttons/icons.png) 0 99px no-repeat;
to
background: url(/assets/css3buttons/icons.png) 0 99px no-repeat;
A nasty interim solution/hack would be to write
.button.icon:before { background-image: url(/assets/css3buttons/icons.png) !important; }
in your application.css
You'll grow to love the asset pipeline eventually!
So…
No dice. I had already removed the pre-compiled assets and it's still not working, even though I see form the rails output that the style is being compiled:
Started GET "/assets/css3buttons/styles.css?body=1" for 127.0.0.1 at 2011-10-27 10:04:03 -0700
Compiled css3buttons/styles.css (7ms) (pid 81535)
Served asset /css3buttons/styles.css - 200 OK (18ms)
The suggested hack does works for now, but I can't figure out what could be causing this problem in my environment.
Ylan.
On Oct 27, 2011, at 9:49 AM, John Rees wrote:
Are any of your assets precompiled? Try running
rm -rf public/assets/*.css
Then look at
/assets/css3buttons/styles.css?body=1
and see if it has changed
background: url(/css3buttons/icons.png) 0 99px no-repeat;
to
background: url(/assets/css3buttons/icons.png) 0 99px no-repeat;
A nasty interim solution/hack would be to write
.button.icon:before { background-image: url(/assets/css3buttons/icons.png) !important; }
in your application.css
You'll grow to love the asset pipeline eventually!
Reply to this email directly or view it on GitHub: https://github.com/thetron/css3buttons_rails_helpers/issues/23#issuecomment-2546088
John, I still haven't found a solution to my particular problem, but I found a workaround that I like better:
I forked and instead of using asset_path, I am using asset_data_uri to embed the image in the stylesheet itself (which works fine for my purposes since all user's have modern browsers).
using
gem 'css3buttons', :git => 'git://github.com/johnrees/css3buttons_rails_helpers.git'
and afterwards clearing out tmp/cache/ and tmp/sass-cache/ solved the problem for me. Icons are showing again
@leflings: thanks! That worked for me too.
Hi Nic, I get installed Rails 3.1.0 but your gem seems not work. When I hit the "rails g css3buttons" this is the output: "Could not find generator css3buttons."
Thanks for your work!
With Rails 3.1 you don't need run a generator because of the asset pipeline.
Please refer to 'Getting started - Rails 3.1' in the readme.md
Hi John,
you want say that I have to include gem "css3buttons" in my gemfile, put these strings *= require css3buttons in application.css *= require_self
and start to styling my links?
Thanks for your help
Ok, for the reset.css , but for the "css3-gitub-buttons.css" there is a routing error: "No route matches [GET] "/assets/css3buttons/css3-github-buttons.css"