-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix #3365. Default config.relative_url_root to ENV["RAILS_RELATIVE_URL_ROOT"]. #3946
Conversation
Please can you rebase with master? Github reports that this pull request cannot be automatically merged. |
My vote is +1 to this |
+1 |
I've made quite a mess. Can you try now? |
Now can be merged but you can squash your commits in one and force push (git push -f)? (to avoid have the "Merge master", "Merge conflict" and the repeated "Add a test case for RAILS_RELATIVE_URL_ROOT" commits) A tutorial to do it: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html |
It's fixed now ;) |
Yeah, now it's great and ready to be merged :D |
Fix #3365. Default config.relative_url_root to ENV["RAILS_RELATIVE_URL_ROOT"].
Sorry, but with this am I still supposed to use Is there any documentation as to how to really use a rails 3.2.1 app inside a subfolder? |
@sergiocampama do you use Passenger? If so you don't need to configure |
no, i'm using nginx + thin when precompiling, the assets get generated on the public folder? (I haven't really released my app yet, I'm only in development mode) if that's the case, then I see how it should work. But I still need |
Once precompiled they land in public/assets. I don't know how you configured your nginx so can't help you precisely. But you should not touch config.assets.prefix at all. http://guides.rubyonrails.org/configuring.html says:
Try and set that in environments/development.rb. Also notice the action_controller part, it's important. |
Hello, I have a file at background: url("<%= image_path "asterisk.gif" %>") ... When I run So, I want Any help would be appreciated! |
It should be: |
Nope, I'm afraid that doesn't make a difference. Image paths are still missing |
I should mention that I have the following line in
I am not initializing the environment for asset precompiling, and I cannot because it crashes on Heroku when the production database is not configured. |
Does it work if that configuration option is true on your local machine? If so, we have found the reason for the bug. Although I would suggest for you to configure it via |
Wait a second. So is it Passenger or Heroku? |
I'm afraid it's both... It's an open source application that needs to support all deployment strategies. So if a solution won't work for Heroku (without |
@josevalim: Yes, it does work with |
@josevalim - In recent versions of Rails, we were able to set However, that seems to have changed in
What would you advise for my situation? Is it logical for Rails to support loading the environment without a database, or could Sprockets also handle the |
@ndbroadbent I hade the same issue . The problem is definitely
I removed it in config/environments/development.rb, set
and ran
That worked for me. |
I am seeing on Rails 3.2.13 that However, As mentioned above,
|
This pull request fixes generation of asset paths inside assets when deploying to sub-URI.
For example when our app is deployed inside
/community
thisNow produces a proper path:
instead of
/assets/bg.png
.Precompilation:
Also works!