File tree 4 files changed +14
-3
lines changed
4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ config.rails_lineman.lineman_project_location = "my-lineman-app"
28
28
29
29
Alternatively, rails-lineman will look for an environment variable named ` LINEMAN_PROJECT_LOCATION ` .
30
30
31
+ Note that to prevent your Lineman JavaScript & CSS from being loaded twice in production, you'll need
32
+ to remove the ` require_tree . ` directives from ` app/assets/javascripts/application.js `
33
+ and ` app/assets/stylesheets/application.css ` .
34
+
31
35
### the Lineman side
32
36
33
37
Just add the [ lineman-rails] ( https://github.com/testdouble/lineman-rails ) plugin to your project:
@@ -110,6 +114,15 @@ Such that the `public/assets` folder looks like:
110
114
└── manifest-c468cd8d56c4364af6110bc39b00ed40.json
111
115
```
112
116
117
+ Note that in Rails 4, Rails will by default not serve any static assets out of
118
+ ` public/assets ` when running in the production environment (leaving that up to
119
+ Apache/nginx). To verify this is all working you may need to configure in
120
+ ` config/environments/production.rb ` :
121
+
122
+ ``` ruby
123
+ config.serve_static_assets = true
124
+ ```
125
+
113
126
## Heroku
114
127
115
128
Somewhat humorously, rails-lineman will actually try to detect whether it's running on Heroku
Original file line number Diff line number Diff line change 13
13
//= require jquery
14
14
//= require jquery_ujs
15
15
//= require turbolinks
16
- //= require_tree .
Original file line number Diff line number Diff line change 9
9
* compiled file, but it's generally better to create a new file per style scope.
10
10
*
11
11
*= require_self
12
- *= require_tree .
13
12
*/
Original file line number Diff line number Diff line change 20
20
# config.action_dispatch.rack_cache = true
21
21
22
22
# Disable Rails's static asset server (Apache or nginx will already do this).
23
- config . serve_static_assets = false
23
+ config . serve_static_assets = true
24
24
25
25
# Compress JavaScripts and CSS.
26
26
config . assets . js_compressor = :uglifier
You can’t perform that action at this time.
0 commit comments