Open wizztjh opened 13 years ago
post your assets.yml
<% asset_version = ["1.0","1.2","1.2_general","2.0","2.04","2.05","2.06","2.07","2.08","2.1","2.11","2.2"] CURRENT_VERSION = 2.2 %> package_assets: on javascript_compressor: closure compilation_level: "WHITESPACE_ONLY" gzip_assets: on s3_access_key_id: xxx s3_secret_access_key:xxx s3_bucket: xxx embed_assets: datauri;
use_cloudfront: on cloudfront_dist_id:xxx cloudfront_domain: xxx
s3_upload_files:
javascripts: user_session:
public/javascripts/json/json2.js
jq-<%=CURRENT_VERSION%>:
public/javascripts/<%=CURRENT_VERSION%>/1_jquery.js
campaign-<%=CURRENT_VERSION%>:
stylesheets: main:
public/stylesheets/main_2.css
builder:
public/stylesheets/event-effect-prototype.css
campaign:
public/stylesheets/publish.css
builder-<%=CURRENT_VERSION%>:
public/stylesheets/<%=CURRENT_VERSION%>/textstyle.css
campaign-<%=CURRENT_VERSION%>:
public/stylesheets/<%=CURRENT_VERSION%>/jquery-ui-1.8.14.custom.css
<% for ver in asset_version %> <% end %>
The option use_cloudfront should be set to either of the two values: invalidate or version. Try: use_cloudfront: version or use_cloudfront: invalidate
i looked inside my ~/.rvm/gems/ruby-1.8.7-p352@rails238/gems/jammit-s3-0.6.0.2/lib/jammit-s3.rb
require 'jammit/command_line'
require 'jammit/s3_command_line'
require 'jammit/s3_uploader'
module Jammit
def self.upload_to_s3!(options = {})
S3Uploader.new(options).upload
end
end
the code above is not same with github. the code below that set the asset host is still missing even i have set my gemfile to https://github.com/railsjedi/jammit-s3.git
if defined?(Rails)
module Jammit
class JammitRailtie < Rails::Railtie
i try to binding.pry within the ~/.rvm/gems/ruby-1.8.7-p352@rails238/gems/jammit-s3-0.6.0.2/lib/jammit-s3.rb to check whether it will run when rvmsudo bundle exec jammit-s3 , and it runs into pry.
So , i think the problem is happening when i bundle install for rails 2.3.8. Do you have any idea what cause this?
Thanks for the quick reply kmamykin!
but somehow when pushed to heroku , it will load the missing code and it prompt this error uninitialized constant Rails::Railtie (NameError)
2011-09-01T09:37:22+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant Rails::Railtie (NameError)
2011-09-01T09:37:22+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in `const_missing'
2011-09-01T09:37:22+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/bundler/gems/jammit-s3-e8aaa4074ab1/lib/jammit-s3.rb:13
2011-09-01T09:37:22+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
2011-09-01T09:37:22+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
2011-09-01T09:37:22+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each'
after done some research ... rails 2 dont have Rails::Railtie i suggest to put
if defined?(Rails) && Rails.version =~ /^3\./
end
around it
Thank you for digging into this issue. I have only used the gem with Rails 3, dont have rails 2 apps using it.
Since you are already in the midst of things, may be you can test out a patch and submit a pull request?
Much appreciated.
sure!
On Sat, Sep 3, 2011 at 2:52 AM, kmamykin < reply@reply.github.com>wrote:
Thank you for digging into this issue. I have only used the gem with Rails 3, dont have rails 2 apps using it.
Since you are already in the midst of things, may be you can test out a patch and submit a pull request?
Much appreciated.
Reply to this email directly or view it on GitHub: https://github.com/railsjedi/jammit-s3/issues/24#issuecomment-1982012
any updates in this...
It seems to be not working in my rails app.