On Wednesday, June 27, 2012 12:54:41 PM UTC-4, Ylan wrote: > > On Jun 27, 2012, at 9:42 AM, Vell wrote: > > > > > 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: > > > [snip] > > I don't see any obvious errors there, and I am assuming that you already > checked line 13 of application.js for correctness. At this point, I am out > of ideas on where the problem is. If I where you, I would start a blank > rails application in which you *can* precompile the assets. Then starts > looking for potential differences between the brand new app and yours. > > So I did end up resolving this issue. There were 2 issues.
1. jquery-rails doesn't like being in the assets block of my Gemfile. Once I took it out of that block I was able to compile in production without any error. I happened to be passing through railscast and saw that one of Ryan Bates examples had that particular line under the assets block. 2. I had an error in one of my .js files so removed the file and everything seems to be working as expected. I will see if I can figure out what is going on with that .js file at a later date. Thanks for the help in trying to get me to solve this issue. Sorry, I can't be of more help. > > -- > Ylan > > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/PrE1Kr1OuyIJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.

