Skip to content

Instantly share code, notes, and snippets.

@tacettin
Last active January 1, 2016 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tacettin/8121437 to your computer and use it in GitHub Desktop.
Save tacettin/8121437 to your computer and use it in GitHub Desktop.
Vendor of rails_admin
#Comment
=begin
FWIW, I'm on Rails 3.1/ruby 1.9.2 and want a clean production precompile (such that I could have config.assets.compile = false in production.rb so realtime compilation never happens).
I had to do the following things to make this work:
use the rake task in https://gist.github.com/1185448 instead of the builtin assets:precompile
vendor the rails_admin gem. This is wise to do for production apps anyway since it's not really versioned yet. I do this by:
=end
% (cd vendor/git ; rm -rf rails_admin ; git clone git://github.com/sferik/rails_admin.git ; rm -rf rails_admin/.git)
and having
gem 'rails_admin', :path => 'vendor/git/rails_admin'
#Comment
=begin
in my Gemfile
in the rails_admin gem, rename app/assets/javascripts/rails_admin/rails_admin.js to app/assets/javascripts/rails_admin/application.js
in the rails_admin gem, rename app/assets/stylesheets/rails_admin/rails_admin.css to app/assets/stylesheets/rails_admin/application.css
in the rails_admin gem, change references in app/views/layouts/rails_admin/main.html.haml from rails_admin/rails_admin.(css,js) to just rails_admin/application (no suffix)
I don't know how much of this is that no one else has tried to production deploy with these requirements (no dynamic compilation of assets) or if I've missed something that's simpler to do, but it is working as intended.
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment