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

Rails4 + LESS Bootstrap compatibility #81

Closed
airatdev opened this issue Jul 16, 2013 · 1 comment
Closed

Rails4 + LESS Bootstrap compatibility #81

airatdev opened this issue Jul 16, 2013 · 1 comment

Kommentare

@airatdev
Copy link

Hi guys, I investigated some strange problem:

If you use rails 4 app with twitter bootstrap (built on LESS), including your gem in Gemfile makes assets precompilation on deploing to Heroku always fail, it throws error:

Running: rake assets:precompile
rake aborted!
error evaluating function `asset-path`: wrong number of arguments (1 for 2)

After that I forked your repo and commented the following lines of code:

if defined? ActionView::Helpers::AssetUrlHelper
  module ActionView::Helpers::AssetUrlHelper
    alias :original_path_to_asset :path_to_asset

    def path_to_asset(source, options)
      options ||= {}
      if Cloudinary.config.enhance_image_tag && options[:type] == :image
        source = Cloudinary::Utils.cloudinary_url(source, options.merge(:type=>:asset))
      end
      original_path_to_asset(source, options)
    end
  end
end

And everything works fine now (at least, my app successfully being deployed to Heroku). As I understand, the problem is in conflict between overrided path_to_asset and asset-path in bootstrap_and_overrides.css.less. I'm not much aware of how your gem works, and which part of app did I broke by commenting this lines, but could you guys please kindly investigate this bug and fix compatibility? Thanks.

@TalLevAmi
Copy link
Contributor

Solved in master. We will release a new gem by next week.

nadavs added a commit that referenced this issue Jul 18, 2013
…w data URI, Issue #81 - Error on bootstrap + rails under Rails 4, Support admin ping API, Include updated jQuery plugin
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

2 participants