Closed jeremywhittington closed 12 years ago
In rails > 3.1 you will probably want to put the JavaScript file in the assets/javascripts folder instead of the default public/javascripts folder.
I moved s3_upload.js from public/javascripts to app/assets/javascripts however I am still seeing the same error. I have tried to rerun bundle exec rake assets:precompile.
I am still playing with it trying to understand but any help would be appreciated.
I figured it out, for anyone having this issue you must change config.assets.compile to true in config/environments/production.rb.
config.assets.compile = true
Wow... config.assets.precompile just saved my life! Thanks for that :-)
Saved my life as well. Thanks
I am currently trying to use this plugin on a Heroku Rails 3.1.3 application.
I have this in my gemfile.
gem 's3_swf_upload', :git => 'git://github.com/nathancolgate/s3-swf-upload-plugin' gem 'aws-s3', :require => 'aws/s3'
I bundled the gem into my application, generated the rails code, created a new controller and view, and added the following to the view.
I have added, committed and pushed all files to the heroku master. I am getting the following error.
2011-12-27T17:53:14+00:00 app[web.1]: Completed 500 Internal Server Error in 129ms 2011-12-27T17:53:14+00:00 app[web.1]: 2011-12-27T17:53:14+00:00 app[web.1]: ActionView::Template::Error (s3_upload.js isn't precompiled): 2011-12-27T17:53:14+00:00 app[web.1]: 1: <div id="wrapper"> 2011-12-27T17:53:14+00:00 app[web.1]: 2: <h1>Uploader</h1> 2011-12-27T17:53:14+00:00 app[web.1]: 4: <input type="submit" value="Start Uploading" onclick="s3_swf_1_object.startUploading();" /> 2011-12-27T17:53:14+00:00 app[web.1]: 3: <%=raw s3_swf_upload_tag %> 2011-12-27T17:53:14+00:00 app[web.1]: 5: </div> 2011-12-27T17:53:14+00:00 app[web.1]: app/views/pages/home.html.erb : 3 : in `_app_views_pages_home_html_erb___2628368205308588842_20282460'
I have also tried running the following.
bundle exec rake assets:precompile