Tag: asset-pipeline

Correct use of non-stupid-digest-assets gem

Even though it is a very, very simple gem, I believe I don’t understand the idea behind non-stupid-digest-assets (https://github.com/alexspeller/non-stupid-digest-assets) since it isn`t working on my app. I need to use CKEDITOR on my app, but the rails digest is messing everything up. I added this to config/initializers/non_digest_assets.rb: NonStupidDigestAssets.whitelist = [/ckeditor\/.*/] But my ckeditor files still […]

Rails Assets in Production

I’ve just migrated to rails 3.1 and I’m having trouble getting started with the asset pipeline. I ran: bundle exec rake assets:precompile RAILS_ENV=production after adding additional css files into config.assets.precompile += [‘scaffold.css’, ‘other.css’, ‘other.js’] all of my files are located in the /app/asset images, javascripts, or stylesheets path. Following the rake task, I can see […]

rack-zippy and option -d in production env doesn't serve static assets

I’ve a really weird problem here. I’m using the rack-zippy gem in my rails application and if I start it in development environment without pre-compiled assets it works like a charm. With the -d param and without. In production mode (same machine, same project, same directory, same gems) it works too. But if I start […]

Static image assets in rails app not displaying on Heroku production

I tried pre-compiling my images before deployment using the command: $ RAILS_ENV=production bin/rake assets:precompile I am using image_tag‘s in my templates that work in development. Update: config.serve_static_files is said to default to true in dev, but then is turned off in production because the assets should be provided via your web server. I currently am […]

run rake task inside rails application

I want to run asset precompile task inside the rails application,As I had many dependencies who will change the code,in that case all the time whenever they change i need to run the script as I cant give server access to them so I am providing the GUI for them from that they alone can […]

Rails app on percise32 vagrant box – assets get “text file busy” error (Errno::ETXTBSY)

Trying to boot up a Rails app inside a Vagrant box (percise32) host machine is Windows 7. This is my Vagrantfile Vagrant.configure(‘2’) do |config| config.vm.box = ‘precise32’ config.vm.box_url = ‘http://files.vagrantup.com/precise32.box’ config.vm.hostname = ‘rails-dev-box’ config.vm.synched_folder “c:\rails_text”, “/home/code” config.vm.network :forwarded_port, guest: 3000, host: 3003 config.vm.provision :puppet do |puppet| puppet.manifests_path = ‘puppet/manifests’ puppet.module_path = ‘puppet/modules’ end end When […]

Why does Rake task enhancement differ between my local environment and when deploying to Heroku Cedar?

I have this in lib/tasks/foo.rake: Rake::Task[“assets:precompile”].enhance do print “>>>>>>>> hello from precompile” end Rake::Task[“assets:precompile:nondigest”].enhance do print “>>>>>>>> hello from precompile:nondigest” end When I run rake assets:precompile locally, both messages are printed. When I push to heroku, only the nondigest message is printed. However, according to the buildpack, the push is executing the exact same command […]

Rails include javascripts assets folder recursively

I understand how to add one javascript file to rails assets pipeline. Just add //= require filename to application.js But how can I include many javscripts files under one folder vendor/assets/javascripts/<js_library> Or I have to list them all explicitly ?

Slow assets compilation in development mode

I have a large rails app with hundreds of coffee script files. Sometimes when I make a tiny change in a coffeescript file or I switch the branch the whole assets are being precompiled and I have to wait a long time for load the page: Started GET “/assets/application.js” for 127.0.0.1 at 2013-01-11 19:39:45 +0100 […]

Asset compiling crashing on server environment with: “NoMethodError: undefined method `' for nil:NilClass”

I’ve been pulling my hair out for this one. I’ve always had a bad relationship with the asset-pipeline, it is always giving me trouble.. And today again.. When I try and compile my assets locally, everything is fine: $ RAILS_ENV=production rake assets:precompile –trace But when I deploy with Capistrano which does: cd /var/www/xxx/releases/20140717164232 && ( […]

Ruby is the best programming language in the world - Ruby on Rails.