Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

New Rails Install Problem: Could Not find Gem Uglifier

I am new to Rails. I am running Windows XP with WAMP installed and running successfully.

I have downloaded Ruby 2.0.0p481 and Ruby Dev Kit. I installed Ruby fine, but when I installed Rails I am unable to start my rails server.

At the dos command prompt when I type bundle exec rails server and git <ENTER>, I get the following error: "Could not find gem uglifier <>= 1.3.0 in the gems available on the machine.

Does anyone have any advice? How can I fix my rails install?

4 Answers

Austin Davis
Austin Davis
23,939 Points

Getting Rails up and running for the first time is a great learning opportunity. The troubleshooting can be frustrating, but it's a good introduction to what you're working with/ what Rails is. Have you checked to see if the uglifier gem is listed in the Gemfile for your app? If not, try adding it and running bundle install again. Then see if you still have the same problem.

Where do I look to see if the uglifier gem is listed in the Gemfile for my app? What do I look for?

How do I check to see if the uglifier gem is listed in the gemfile for the app? Where do I look? What do I look for?

Austin Davis
Austin Davis
23,939 Points

Do you have a text editor installed- such as sublime text? (if not, you'll want to install one. sublime text is commonly used in the Treehouse tracks but there are a variety of options... just use google) -- Using the text editor.... select to "open a folder" and find the folder in which your app is stored. The list of folders and files you will see - is the structure automatically generated by rails when you executed the command to create the application. In that list there will be a file titled Gemfile. Take a moment to look it over, you shouldn't expect to fully understand it on your first glance... however it will clearly indicate the name of each gem currently included in the app.

Yes I have Sublime Text. I executed the command "bundle install"

I receive the following error. Any suggestions for a fix? Gem::Ext::BuildError: ERROR: Failed to build native extension C:\Ruby200\bin\ruby.exe extconf.rb compiler error: Illegal instruction

Here is my Gemfile source 'http://rubygems.org'

Bundle edge Rails instead: gem 'rails', github: 'rails/rails'

gem 'rails', '4.1.2'

Use sqlite3 as the database for Active Record

gem 'sqlite3'

Use SCSS for stylesheets

gem 'sass-rails', '~> 4.0.3'

Use Uglifier as compressor for JavaScript assets

gem 'uglifier', '>= 1.3.0'

Use CoffeeScript for .js.coffee assets and views

gem 'coffee-rails', '~> 4.0.0'

See https://github.com/sstephenson/execjs#readme for more supported runtimes

gem 'therubyracer', platforms: :ruby

Use jquery as the JavaScript library

gem 'jquery-rails'

Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks

gem 'turbolinks'

Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder

gem 'jbuilder', '~> 2.0'

bundle exec rake doc:rails generates the API under doc/api.

gem 'sdoc', '~> 0.4.0', group: :doc

Use ActiveModel has_secure_password

gem 'bcrypt', '~> 3.1.7'

Use unicorn as the app server

gem 'unicorn'

Use Capistrano for deployment

gem 'capistrano-rails', group: :development

Use debugger

gem 'debugger', group: [:development, :test]

Windows does not include zoneinfo files, so bundle the tzinfo-data gem

gem 'tzinfo-data', platforms: [:mingw, :mswin]

Still not able to install Ruby and the Ruby DevKit 32-bit on my Windows XP Machine. See error above. Is this because I am running a 32-bit version of Windows XP? Any suggestions?

Any suggestions?