Tag: asset-pipeline

Rails 4: Not able to require Bootstrap

I am following Tuts+ tutorial on “Building a Polling Application in Rails”. I have followed along with every foundational step to configure the app. With the ‘bootsrap-sass’ gem installed, he simply adds the *= require bootstrap to the application.css file and instantly sees the changed results on his server. However, I receive the following error.. […]

Rails 3.1 assets not loading properly in production for ActiveAdmin

I’m using ActiveAdmin with Rails 3.1. The only images (that I’m aware of) that this gem uses are sorting arrows in the header rows of tables. In development, the CSS properly references these images: table.index_table th.sortable a { background: url(“/assets/active_admin/orderable.png”) no-repeat 0 4px; padding-left: 13px; } In production, the CSS does not properly reference these […]

Rails 3 JavaScript resource pipeline management

I was wondering what the differences are between using a Ruby gem to include a JavaScript library into a Rails project versus including the JavaScript file yourself. I do know that you can lock down a version of the js library using bundler or alternatively, update all of your js libraries through bundler with one […]

how does the gem backbone-on-rails generate its templates

I’m trying to understand how the gem backbone-on-rails works under the hood. My problem right now is that I don’t know who is in charge of generating the code for the templates it provides. After installing and setting it up (I’m using the plain js route, not coffeescript, but the question is the same), if […]

Rails3: additional jQuery gems don't work

I’m experiencing the following problem: I operate rails 3.2.13 with RVM and I have installed 3 Jquery gems which ended up working, somehow (although they didn’t initially, and I haven’t understood why they suddenly started to work…): Datepicker, BestInPlace and DataTables. Now, whenever I install additional Jquery gems, they never work. I tried everything, to […]

How to include assets from an external gem in my custom gem

I’m trying to refactor out some of the common code used across several internal sites into a gem that could be used as a baseline configuration for existing and future sites. So for example all of these sites include the backbone-on-rails gem. I’ve created a custom gem, included backbone-on-rails in the Gemfile for this new […]

Error when deploying: '@asset_name is not allowed as an instance variable name (NameError)'

I’m using rbenv. I recently updated some gems including rollbar, rubyzip, database-cleaner, capybara and selenium-webdriver (which causes a bunch of other gems to be updated by bundler). Now I can’t deploy (using capistrano). Here’s the error, with some previous commands for context: * executing “ln -s /store/mysite.com/logs/rails/staging /store/mysite.com/rails/staging/releases/20130920190506/log” servers: [“server.mysite.com”] [server.mysite.com] executing command command finished […]

javascript asset not being found in gem

This should have been a no-brainer, but has me stumped. For convenience, I took a bootstrap plugin (bootstrap-combobox) and turned it into a gem, so I can version it properly and all. My gem is bootstrap-combobox-rails. It packages up fine, bundle installs fine, but when I try to reference the assets: The stylesheet works, although […]

rake assets:precompile, Command failed with status (137):

I am trying to precompile assets using assets:precompile command but i am getting below error. ** Invoke assets:precompile (first_time) ** Execute assets:precompile /root/jruby-1.7.9/bin/jruby /root/jruby-1.7.9/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets –trace ** Invoke assets:precompile:all (first_time) ** Invoke assets:cache:clean (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment ** Invoke environment (first_time) ** Execute environment ** Execute assets:cache:clean ** Execute […]

Upgrading from rails 3.2 to 4.1, no scss nor css being loaded

i’m upgrading from rails 3.2 to 4.1 and am having trouble seeing any of my css/scss on my page! I ran rake assets:precompile and got this back: Using Node ExecJS runtime I, [2014-09-17T14:33:38.707329 #32048] INFO — : Writing /Users/jay/Code/app/public/assets/glyphicons-halflings-regular-447971b753b8b31b235edcb58bd6d465.eot I, [2014-09-17T14:33:39.311546 #32048] INFO — : Writing /Users/jay/Code/app/public/assets/application-c560138eebdd44e87d4eeecdbe93b4a6.js I, [2014-09-17T14:33:39.518320 #32048] INFO — : Writing /Users/jay/Code/app/public/assets/tinymce/plugins/uploadimage/dialog-6ac59fd1265fccc5bccc556ef7f3eab1.html […]

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