Active7 months ago
Install Rails is the easiest way to install Ruby on Rails Version 5, or to update Ruby with RVM, on Mac, Windows, Linux (Ubuntu). Install Rails: A step-by-step guide for installing Ruby on Rails. Quick Tips How to Install Gems in Ruby on Rails by Jason Seifer 0:06. Hi, I'm Jason. In this treehouse quick tip, we're going to talk about how to install Ruby gems. A Ruby gem is a library that you can use in your Ruby applications. It's really easy to install a gem. RubyGems is a package management application for Ruby that is used to quickly and easily distribute Ruby/Rails applications and libraries. If you are planning on doing any development in Ruby, this is a must have. RubyGems is for Ruby as apt-get and yum are to Linux operating systems. This article will show you various. Follow these steps: Go to the Ruby Installer in your web browser. Scroll down to the Development Kit section and click the file under 'For use with Ruby 2.0. Run the Development Kit installer by choosing Run Program (if Windows presents this option). Enter C:DevKit for the location, as shown.
If I download a .gem file to a folder in my computer, can I install it later using
the Tin Mangem install
?![Install gem on windows Install gem on windows](/uploads/1/2/6/2/126236302/233741688.png)
140k2727 gold badges181181 silver badges261261 bronze badges
hectorsqhectorsq40.6k1818 gold badges4040 silver badges4646 bronze badges
7 Answers
Yup, when you do
gem install
, it will search the current directory first, so if your .gem file is there, it will pick it up. I found it on the gem reference, which you may find handy as well:gem install will install the named gem. It will attempt a local installation (i.e. a .gem file in the current directory), and if that fails, it will attempt to download and install the most recent version of the gem you want.
Ross Attrill1,55011 gold badge1515 silver badges2020 bronze badges
Chris BunchChris Bunch62.8k3434 gold badges115115 silver badges122122 bronze badges
Also, you can use
gem install --local path_to_gem/filename.gem
This will skip the usual gem repository scan that happens when you leave off
--local
.You can find other magic with
megasgem install --help
.16.6k1111 gold badges6767 silver badges119119 bronze badges
JasonTrue![Install ruby gems windows offline Install ruby gems windows offline](/uploads/1/2/6/2/126236302/704733856.png)
17.7k33 gold badges3030 silver badges5555 bronze badges
you can also use the full filename to your gem file:
this works as well -- it's probably the easiest way
lesmana18.7k66 gold badges6565 silver badges7676 bronze badges
user979912
If you create your gems with bundler:
You can install them with rake after they are written:
Chances are, that your downloaded gem will know
Boris StitnickyBoris Stitnickyrake install
, too.10.1k44 gold badges4646 silver badges6565 bronze badges
if you download the project file from github or other scm host site, use gem build to build the project first, so you can get a whatever.gem file in current directory. Then gem install it!
hechen0hechen0
If you want to work on a locally modified fork of a gem, the best way to do so is
gem 'pry', path: './pry'
in a Gemfile.
... where
MattW.MattW../pry
would be the clone of your repository. Simply run bundle install
once, and any changes in the gem sources you make are immediately reflected. With gem install pry/pry.gem
, the sources are still moved into GEM_PATH
and you'll always have to run both bundle gem pry
and gem update
to test.10.8k44 gold badges4848 silver badges6262 bronze badges
Go to the path in where the gem is and call
gem install -l gemname.gem
leobelizquierdoleobelizquierdo
Not the answer you're looking for? Browse other questions tagged rubyrubygems or ask your own question.
To run Ruby on Windows, you have to install Ruby and several developer tools. The following instructions have been tested with Windows 8 and 8.1.
Install Ruby And Rubygems On Windows
- Go to Ruby Installer in your web browser.
- Click the big red Download button.A list of RubyInstallers appears.
- Click Ruby 2.2.2 near the top of the RubyInstallers list.Do not click Ruby 2.2.2 (x64).An installer program downloads to your computer.
- Run the installer program by choosing Run Program (if Windows presents this option) or double-clicking the file when it’s done downloading.The installer will ask you to select a language to use during installation. Accept the license, and then the installer will have you set some configuration options. Leave the default folder choice alone, but uncheck the Install Tcl/Tk Support check box, and make sure that the other two check boxes — Add Ruby Executables to Your PATH and Associate .rb and .rbw Files with This Ruby Installation — are selected.
When the installer is done, it will have created a topmost folder with all the Ruby software on your C: drive called C:Ruby22. You can use Windows 8 Desktop and the File Explorer to confirm that it’s there (as shown here).
You must also download the Development Kit from Ruby Installer to get some of the cool tools used by your Ruby projects. Follow these steps:
- Go to the Ruby Installer in your web browser.
- Scroll down to the Development Kit section and click the file under “For use with Ruby 2.0 and above (32bits version only)”.Download the Development Kit for Ruby 2.0 and above. Be sure to click the 32bits version.An installer program downloads to your computer.
- Run the Development Kit installer by choosing Run Program (if Windows presents this option) or double-clicking the file when it finishes downloading.The installer will ask you where to put the kit. You want to put the kit in its own folder, not in the Ruby folder you selected in Step 1. To make things easy for your projects, select a folder next to the Ruby22 one at the top of your C: drive.
- Enter C:DevKit for the location, as shown here.
Now you need some final setup. Follow these steps:
- Open your Windows launch screen (or use the Start Menu).
- Click the Start Command Prompt with Ruby program.If you have a lot of programs installed in your launch screen, use the search feature and type command to help narrow down the choices.In the command prompt application, you type commands to get things done. Typing commands is a low-level way of working with a computer. Before the mouse and graphical interface was invented, this was the only way to tell the computer what to do!
- Change your location to the Developer Kit folder.When you first open the command prompt application, you’re usually in your home directory. To complete setup, you need to move to the DevKit directory. The display will show you a prompt that gives a hint of where you’re starting from:Remember, you don’t need to type the prompt part, just the command line itself.Change folders by typing cd DevKit and pressing the Enter key to tell the computer you’re done with that command.You see the prompt change to your new location:
- Use Ruby to set up more Ruby tools.Development Kit has a Ruby setup program called dk.rb that you use for a couple of different steps. Enter the first command and watch for it to complete, as shown.If you see the Initialization complete! message, Development Kit is ready to finish installing its tools.
- Enter the install command and wait for it to complete:Phew! You only have to do these commands once to get your computer ready for Ruby programming and you’re almost there!
- The Development Kit is ready and now you can install Ruby gems (little add-on enhancements for Ruby).Enter the command and review the progress messages:You may get a Windows security warning saying that Ruby is trying to use the network. This is okay — you can select the default values in the dialog box. You may have to enter your password to dismiss the dialog box.
Wow, that was a lot, but now you have Ruby installed!
Now you will want a code editor to help make writing your programs easy:
- In your browser, go to Atom and click the Download Windows Installer button.Atom is a free, powerful code editor that can be used for programming many different computer languages. It works well with Ruby.An installer program downloads to your computer.
- Run the Atom installer by choosing Run Program (if Windows presents this option) or double-clicking the installer program when it finishes downloading.You see a progress dialog box. When the installer is done, the Atom editor starts up.You see the Atom welcome screen, which means you’re all set to start programming with Ruby!
Ruby is constantly being updated and improved. The current release of Ruby at the time of this writing is version 2.2.2. Ruby uses a versioning scheme where the first number is the major version, the second number is the minor version, and the third number is the current build number (sometimes called the patch number).
Install Ruby Windows10
On Windows, to utilize the game programming library Gosu, it’s important to select the version of Ruby and the Development Kit that indicate they are 32 bit.