(Windows Installer) Installation Procedure - Ruby Forum

soilkinkajouInternet και Εφαρμογές Web

2 Φεβ 2013 (πριν από 5 χρόνια και 5 μήνες)

230 εμφανίσεις


(Windows Installer)

Installation Procedure

Ruby can be installed either choosing a One Click Installer

from this link

installing the ruby components separately as prebuilt packages from this link


comes with a r
uby IDE that has to be employed,
against the windows command p
can be used
in the ruby installer pre built package version

I have chosen to use the pre
built packages and custom

configure the ruby components.
You can
ownload and install the latest version of ruby here.
. You can check
the version installed, in the command prompt using this command: “ruby


Once ruby installation is done
, we need to install the ruby components separately. Ruby calls these
es using the “gems” terminology. Each ruby
component can

be installed as bundles using the
“gems” component.
But before that, we need to ensure if we have to update our copy of the gems
component, just to make sure everything will move on smoothly
: “gem u


In my case (as shown above, there was nothing to update)
. Once ruby and gems are installed, it’s time to
get rails and other components installed.

Installing rails will take quite some time. But once the installation is done, you are
ready to create a rails
application and begin the application development.

Note that your version of the installation may vary
from what’s depicted in the screenshot above. The installation above is an update to the already existing
and installed rails fra

But there is something worthy of notifying at this juncture. We need a web server and a database in
order to be creating and running a valid ruby
rails application. Usually, the gem installation takes care of
installing the packages for us. As a ma
tter of fact
, the WEBrick web server and an
sqlite3 database are
installed by default with the gems installation package.

So once the rails installation is done, the next step would be to create a rails application. A lot of ruby
rails experts recommend y

NOT to create a rails application in the ruby root folder or the windows
program files. You might be better of creating on in the safest location possible

“My Documents”.

matter where you chose to create you rails application, the following comm
d will is the kick off point
“rails new JobBoard” where JobBoard is the name of the rails application you intend to create.
that a lot of rails specific folders are automatically created for you. Once this command runs, your rails
application is se
t up and ready to be worked upon.

The next step is to start up our web server. This can be done by changing the path to point to the
created application directory. (“cd JobBoard” in this case), and running the web server using the
following command: “rai
ls server”. You should see something like “
Booting WEBrick

If you don’t see this screen above, and rather are displayed an error message
, that says something like
the one depicted below, then you probably don’t have the sqlite3 dll file in your ruby bi
n directory.

If you are not sure why this happens, go to your application directory you created, locate (and open in
a notepad maybe) a “Gemfile”. This gem file is like a configuration file and appears in every created

If you notice
, there is a line in this gem file that says: “
gem 'sqlite3
:require =>
”. This means,

that in order for your server
and your rails application to run, you need sqlite and
its dll files in appropriate places in your ruby installation.
You ca
n download the sqlite3 command line
and the sqlite3dll file in these links:



Once downloaded, extract the zip files directly to the Ruby/bin directory.

After extracting you can use the following command to install sqlite3 onto your system.

(Note that
following these steps in i
ncongruous order is not going to affect the sqlite3 installation): “gem install

Now try starting the server using the “rails server” command and you should see the server starting up
this time.

You can test if the server is up and running

testing the following URL in your web browser

and you should see the following page displayed.

Now you are ready to start working on your newly created ruby
rails application.