Moving js to vendor/assets/javascripts/ is not picked up

11 views
Skip to first unread message

David Kahn

unread,
Aug 24, 2011, 2:36:37 PM8/24/11
to rubyonra...@googlegroups.com
Hey all, quick question. I am using Rails 3.1 rc5 and when I move my vendor js libraries to vendor/assets/javascripts, the browser does not receive them. Is there something I need to to in order for this to happen? I thought based on all I have read that this should be an automatically included directory...

7stud --

unread,
Aug 24, 2011, 7:13:31 PM8/24/11
to rubyonra...@googlegroups.com
What does your Gemfile look like?

--
Posted via http://www.ruby-forum.com/.

7stud --

unread,
Aug 24, 2011, 8:41:40 PM8/24/11
to rubyonra...@googlegroups.com
...well that is one way to do it:

http://www.mobalean.com/blog/2011/06/29/using-the-asset-pipeline-under-rails-3-1

But if you read the rails guide on the asset pipeline, they do it
differently:

http://ryanbigg.com/guides/asset_pipeline.html

and if the files are all in the right place, it looks like all you have
to do is add the following to your application's layout file:


<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>

David Kahn

unread,
Aug 25, 2011, 1:50:04 PM8/25/11
to rubyonra...@googlegroups.com
On Wed, Aug 24, 2011 at 4:13 PM, 7stud -- <li...@ruby-forum.com> wrote:
What does your Gemfile look like?

Full gemfile:


gem 'rails', '3.1.0.rc5'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

gem 'pg'

gem 'validates_timeliness', '~> 3.0.2'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'kaminari'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', "~> 3.1.0.rc"
  gem 'coffee-rails', "~> 3.1.0.rc"
  gem 'uglifier'
end

gem 'jquery-rails'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# this needs to be set at heroku
# heroku config:add BUNDLE_WITHOUT='development test'
group :development, :test do
  gem 'ruby-debug19', :require => 'ruby-debug'
  # Pretty printed test output
  gem 'turn', :require => false
  gem 'capybara'
  gem 'rspec-rails'
  gem 'factory_girl_rails'
  gem 'database_cleaner'
#gem 'shoulda'
  gem 'shoulda', '>= 3.0.0.beta'
#gem 'sqlite3-ruby', '1.2.5'
gem 'taps'
  gem 'escape_utils' # warning: regexp match /.../n against to UTF-8 string
  gem 'steak'
  gem 'heroku'
end
 

--

Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.



Reply all
Reply to author
Forward
0 new messages