3

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?

Community
  • 1
  • 1
brain_mane
  • 31
  • 1
  • 3
  • I also have similar problem but its with sqlite 1.3.10. I've both sqlite 1.3.10 and 1.3.11 but Gemlock file has the 1,3,10 version. So I deleted all occurrences of sqlite3 from Gemlock and Gemfile (because I don't use sqlite. I use postgres). Still no luck. If you want to give it a try, keep a backup of Gemlock and Gemfile and then proceed. – learner Jul 17 '16 at 19:25

1 Answers1

2

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

Loc.Nguyen
  • 33
  • 7
  • This didn't work for me. I get this error: `>ruby bin\rails bundle install` `Could not find coffee-script-source-1.8.0 in any of the sources` `Run 'bundle install' to install missing gems.` Does this have anything to do with `coffee-script (2.4.1)` `coffee-script-source` `execjs` in the Gemfile.lock file? – Marco Merlini Jun 18 '17 at 15:59