Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails: coffee-script-source locked at 1.10.0

While following the Ruby on Rails Getting Started Tutorial on Windows 7, in the hello rails section of the tutorial when loading localhost:3000 I got the error

Object doesn't support this property or method

from the line

<%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>

in application.html.erb

This post had success downgrading coffee-script-source to version 1.8.0 by adding the line:

gem 'coffee-script-source', '1.8.0'

to the Gemfile and doing a bundle update. However, when I try to run the bundle update in the cmd line I'm getting the error:

You have requested: coffee-script-source = 1.8.0

The bundle currently has coffee-script-source locked at 1.10.0. Try running 'bundle update coffee-script-source'

If you are updating multiple gems in your Gemfile at once, try passing them all to 'bundle update' Run 'bundle install ' to install missing gems.

I've tried all the suggestions in the error and have restarted the command line multiple times.

I also did a gem uninstall coffee-script-source 1.10.0 and then a gem install coffee-script-source 1.8.0 with the same result.

Any advice on how to unlock a gem from its current version and use the method of setting the version in the Gemfile?

like image 752
brain_mane Avatar asked Apr 16 '26 07:04

brain_mane


1 Answers

Open Gemfile.lock at your locate project ex : C:/Ruby/Project/Gemfile.lock. Find coffee-script-source (1.10.0) and change to coffee-script-source (1.8.0). Then run bundle install again

like image 148
Loc.Nguyen Avatar answered Apr 18 '26 19:04

Loc.Nguyen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!