"rails new" installing incompatible gems

Viewed 34

I'm attempting to learn web development and am having a horrible time setting up my environment through https://www.theodinproject.com. The first step I'm trying is to make my test application by using "rails new test_app". This works, but when I try to run my server and go to the localhost:3000 in my browser I got this error:

TypeError: Object doesn't support this property or method
  (in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/turbolinks-2.5.3/lib/assets/javascripts/turbolinks.js.coffee)
Extracted source (around line #16):

13     <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
14     
15     <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
16     <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
17     <%= csrf_meta_tags %>
18     
19   </head>

Some searching on this site helped me find that the issue was an incompatibility with the gem coffee-script-source-1.12.2, and I was able to fix it by uninstalling it and installing the 1.8.0 version. The only problem is, any time I make a new app using rails new test_app it fetches and installs the 1.12.2 version.

I would like to change this so it doesn't install incompatible gems by default. How can I prevent this, or better yet, fix the incompatibility?

2 Answers

Your rails install is 3-4 years old (turbolinks 2.5.3 was released in 2014). So you need to update ruby and rails to the latest versions. I recommend Rails Installer: http://railsinstaller.org/en

Thanks for the suggestions, I ended up installing a VM with Ubuntu and it's been working with no problem. Appreciate the help.

Related