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

Rails: Weird error/problem with bundler

Hi everyone! I'm having a very odd problem. I have tried to install several gems from the command line with gem install, It goes through its stuff and says it installed the gem, but when I type bundle show for them I just installed it sayd it can't find that gem in any repository. When I try to invoke a generator for an installed gem like devise, It errors out saying it can't find the generator or the gem. Have you ever seen this before? What is the problem. it was all working fine before on earlier practice projects, but now that i'm ready to build my 'real' projects, I'm having this freaky problem.

25 Answers

Hi Osgaldor. That is not a odd problem. A lot of people get that error. Ok, let me explain about your error. I have 2 things to say about it. First, when you typed gem install " name_gem" or here is Devise gem, you actually didn't install on your project. You installed on your RVM library. Second, when you try to use gems, you should add gems you want in your Gemfile. So, now you should try to add gems to your Gemfile like gem 'devise' or gem 'cancan' and run bundle install and you can get back to your project.

I put it in the gem file too, same error!

Make sure you run bundle install or bundle up.

I get errors saying that it can't find simple_file I've even tried to install that gem, it says it installed it, but it doesn't turn up in my system.

When I ran bundle up I got the error message that said "DL is deprecated, please use fiddle" I tried to install Fiddle and got the same success message, but it isn't here.

' DL is deprecated, please use Fiddle ' is actually a warning. The warning message comes out when you require 'irb' ( because irb require 'readline' ) or anything else wants to require 'readline'. If you feel it's annoying, you can comment out it at C:\Ruby200\lib\ruby\2.0.0\dl.rb.

When I ran bundle up I got the error message that said "DL is deprecated, please use fiddle" I tried to install Fiddle and got the same success message, but it isn't here.

    DL is deprecated, please use Fiddle
    Fetching gem metadata from https://rubygems.org/.........     
    Fetching additional metadata from https://rubygems.org/..    
    Resolving dependencies...
    Could not find gem 'simple_file (>= 0) x86-mingw32' in the gems available on
    this machine.

Let's try this: sudo gem update --system

that's the error I get.

I'm on Windows, does sudo work?

Nope, it does not.

    ERROR:  While executing gem ... (OptionParser::AmbiguousOption)
    ambiguous option: -system

Can you paste your Gemfile?

Can you paste your Gemfile?

I tried:

     gem update -system

gem update --system

I tried running it without the flag, just as gem update system

and I got ```

Updating installed gems
Nothing to update
```

try this: gem update --system (with two flag)

This is so crazy! What's wrong?

Gemfile ```ruby source 'https://rubygems.org'

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

# Use sqlite3 as the database for Active Record
    gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# 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'

gem 'devise'

gem 'simple_file'

gem 'thesilverspoon'

# 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', '~> 1.2'

group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]
```

Oh, I saw it. In your gemfile, gem 'simple_file', I've checked on rubygems.org. It doesn't have simple_file gem. Gemfile is looking for simple_file gem on rubygems.org but Gemfile couldn't find it.

how do I check for rubygems and devkit? I know I have rails because I can start the rails server and run the generators.

I definitely have ruby version 2

    ruby 2.0.0p247 (2013-06-27) [i386-mingw32]

Sorry for correcting too much. Ok, you should follow this: http://rubyinstaller.org/. This website in Download section has Devkit for Windows.

I'm re-downloading it now.

Ok, follow rubyinstaller.org and make sure you have Devkit on your Windows.

Thank you. I have also had fatal problems trying to install twitter-bootstrap-rails, it fails over the libv8 gem.

Thank you. I have also had fatal problems trying to install twitter-bootstrap-rails, it fails over the libv8 gem.

Thank you. I have also had fatal problems trying to install twitter-bootstrap-rails, it fails over the libv8 gem.

Thank you. I have also had fatal problems trying to install twitter-bootstrap-rails, it fails over the libv8 gem.

hi do you guys know if there are any tracks that focus on web ui test automation? ie, clicking on buttons, entering text fields etc??