Ruby on Rails Wednesday, June 27, 2012



On Wednesday, June 27, 2012 12:16:03 PM UTC-4, Ylan wrote:


On Wednesday, June 27, 2012 8:16:47 AM UTC-7, Vell wrote:


On Wednesday, June 27, 2012 2:36:33 AM UTC-4, Ylan wrote:



 Val, 

Your Gemfile looks good to me and so does your application.js. 

Are you using bundle exec rake to precompile? Can you post the error message you get about jquery?

Thanks for the response Ylan. I just now tried `bundle exec rake assets:precompile:all` and I am getting the same error about jquery.  The error I am getting is:

 rake aborted!
couldn't find file 'jquery'
  (in /home/vmcilwain/apps/test_app/app/assets/javascripts/application.js:13)

Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
[snip]

Val, 

The error you are getting means that, when running the rake task the jquery gem is not available. There are a few ways this can happen: Did you add the jquery gem only in the development group? In the asset group?

jquery rails is in the assets group of my gemfile
 
Did you remember to run bundle install after adding the gem?

Yes I did run bundle install after adding the gym.
 
What bundler groups are available in which environments (look into your application.rb file). 

I am not sure I am looking in the right place in my application.rb file but here is what I saw at the top of the file:

if defined?(Bundler)
  # If you precompile assets before deploying to production, use this line
  Bundler.require(*Rails.groups(:assets => %w(development test)))
  # If you want your assets lazily compiled in production, use this line
  # Bundler.require(:default, :assets, Rails.env)
end

If answering the above questions doesn't lead you to find the problem, post back your complete Gemfile and we will go from there.

Here is what my gemfile looks like:

source 'https://rubygems.org'

gem 'rails', '3.2.3'

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

gem 'mysql2'
gem "meta_search", "~> 1.1.1"
gem "will_paginate", "~> 3.0.0"
gem "daemons", "~> 1.1.3"
gem 'declarative_authorization', "~> 0.5.1"
gem 'authlogic', '3.1.0', :git => 'git://github.com/binarylogic/authlogic.git'
gem 'paperclip', '3.0.4', :git => 'git://github.com/thoughtbot/paperclip.git'
gem 'tiny_mce', '~> 0.1.7', :git => 'git://github.com/kete/tiny_mce.git'
gem 'friendly_id', '~> 4.0.6', :git => 'git://github.com/norman/friendly_id.git'
gem 'simple-private-messages', '0.0.0', :git => 'git://github.com/jongilbraith/simple-private-messages.git'

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'jquery-rails', '~> 2.0.1'
 
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  gem 'therubyracer', :platform => :ruby
  gem 'uglifier', '>= 1.0.3'
end

group :development do
  # gem 'ruby-debug19', '~> 0.11.6', :require => 'ruby-debug'
  # gem 'ruby-debug19', :require => 'ruby-debug'
  gem 'thin', '~> 1.2.11'
  gem 'exception_notification', :git => 'git://github.com/rails/exception_notification.git'
end

group :test do
  gem 'factory_girl_rails', "~> 1.0.1"
  gem 'faker', "~> 0.9.5"
  gem 'shoulda', "~> 2.11.3"
  gem 'simplecov', "~> 0.4.2"
  gem 'mocha', "~> 0.9.12"
  gem 'turn', :require => false
  gem 'minitest'
  # => below for spork
  gem 'guard'
  gem "rb-fsevent"
  gem "spork"
  gem 'spork-testunit'
  gem "guard-spork"
end

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

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

# Deploy with Capistrano
# gem 'capistrano'

 
-- 
Ylan.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/hlKtkKhDGNsJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment