Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no icons in assets/css3buttons with rails 3.1.1 and 1.0.1 Gem Version #23

Open
e-fu opened this issue Oct 12, 2011 · 17 comments
Open

no icons in assets/css3buttons with rails 3.1.1 and 1.0.1 Gem Version #23

e-fu opened this issue Oct 12, 2011 · 17 comments

Comments

@e-fu
Copy link

e-fu commented Oct 12, 2011

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"):

@antage
Copy link

antage commented Oct 12, 2011

I confirm it. I have the same problem.

@johnrees
Copy link

+1 this pull fixes it johnrees@46fd008

@Nerian
Copy link

Nerian commented Oct 23, 2011

Same problem, please merge 👍

@ghost
Copy link

ghost commented Oct 24, 2011

Same problem.

@ylansegal
Copy link
Contributor

+1

@ylansegal
Copy link
Contributor

@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"):

@johnrees
Copy link

Hmm, it's working here, is this how your Gemfile looks?

gem 'css3buttons', :git => 'git://github.com/johnrees/css3buttons_rails_helpers.git'

@ylansegal
Copy link
Contributor

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:
#23 (comment)

@johnrees
Copy link

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!

@ylansegal
Copy link
Contributor

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:
#23 (comment)

@ylansegal
Copy link
Contributor

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).

@leflings
Copy link

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

@monfresh
Copy link

@leflings: thanks! That worked for me too.

@SimoNonnis
Copy link

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!

@johnrees
Copy link

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

@SimoNonnis
Copy link

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

@SimoNonnis
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants