How to run a Ruby on Rails Project Locally on Windows7

I have this environment and it is easy once you know the tricks. I can't
give you a full step by step, but I will give you the main bulletpoints to
start your research.

Before we go into it, I want to mention running the app on a Linux VM
(which of course we all do). Getting RoR installed and running on a Linux
server is the easiest of all installations. The trickiest part is getting
shared networking between your host OS (windows 7) and the VM guest.

If you have any knowledge or experience with VirtualBox, get Ubuntu Server
for it, RVM, Ruby, and then follow the endless online tutorials. Once your
VM server is up and running, then you can hit the IP or URL from the
browser of your windows 7.

Installing RoR on windows or Mac is a long and tedious process. The first
time I did it took me close to 3 days, now knowing all I know, it still
takes me at least 3-4 hours.

These are the things you will need:

Apache Server

MySQL (or whatever DB you're using. For mysql see guide below).

Ruby installed with RubyInstaller http://rubyinstaller.org/

The ruby Development Kit from RubyInstaller.
-- I always get the 32 bit versions because they seem to cause less
headaches.

Configure the MySQL connector and libmysql.dll Use this guide:

Thin Ruby server http://code.macournoyer.com/thin/ This is the easiest one
to work with on windows. If you are on Linux or Mac you would use passenger
or unicorn.

After you get all that going you can go ahead and put rails and bundler and
all the rest. Every app has certain gem dependencies that you will need to
deal with. There are still a few gems out there that don't play nice on
windows and require extra work. If you encounter one of these, first see if
you can just disable it (:require => false on Bundler).

There is also trickiness regarding apache config, and the windows hosts
file but you should deal with those when you get there. Hope this is enough
info to get you going.

Hello,

I have this environment and it is easy once you know the tricks. I can't give you a full step by step, but I will give you the main bulletpoints to start your research.

Before we go into it, I want to mention running the app on a Linux VM (which of course we all do). Getting RoR installed and running on a Linux server is the easiest of all installations. The trickiest part is getting shared networking between your host OS (windows 7) and the VM guest.

On MacOSX is fairly easy though: VBoxManage modifyvm "Debian" --natpf1 "guestssh,tcp,2222,22

If you have any knowledge or experience with VirtualBox, get Ubuntu Server for it, RVM, Ruby, and then follow the endless online tutorials. Once your VM server is up and running, then you can hit the IP or URL from the browser of your windows 7.

Again for MacOSX is fairly easy for Windows 7, I don't know.

Installing RoR on windows or Mac is a long and tedious process. The first time I did it took me close to 3 days, now knowing all I know, it still takes me at least 3-4 hours.

Hm, no it's less than 40 minutes with 4-6 Mbps ADSL line. Installing a Rails system with rvm/macports is fairly easy/straightforward.

These are the things you will need:

Apache Server

Why do you need an apache server?!

MySQL (or whatever DB you're using. For mysql see guide below).

SQLite3 is used for development and running tests (usually to seed data). The main reason for using this development scheme, strongly supported by AR, is to avoid
complex operations like having to install *this and that* database and spend more time in programming than configuring.

That said there are circumstances where using SQLite on dev and MySQL on production will create some problems (e.g. recently I face a problem with extremely long strings, which worked fine for type 'string' in SQLite3 but required type 'longtext' in MySQL).

Ruby installed with RubyInstaller http://rubyinstaller.org/

The ruby Development Kit from RubyInstaller.
-- I always get the 32 bit versions because they seem to cause less headaches.

Configure the MySQL connector and libmysql.dll Use this guide: http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

Thin Ruby server http://code.macournoyer.com/thin/ This is the easiest one to work with on windows. If you are on Linux or Mac you would use passenger or unicorn.

After you get all that going you can go ahead and put rails and bundler and all the rest. Every app has certain gem dependencies that you will need to deal with. There are still a few gems out there that don't play nice on windows and require extra work. If you encounter one of these, first see if you can just disable it (:require => false on Bundler).

There is also trickiness regarding apache config, and the windows hosts file but you should deal with those when you get there. Hope this is enough info to get you going.

Seriously, I think windows has it's own way of *doing things* (it's own env variables, settings and what not), but generally speaking is not an optimal environment for non-MS related development (for good reasons). So I *know* that Rails on Mac are easily deployed and the situation is not as gloom as you describe. I also believe that Windows is a *bad* platform for ruby developers, but again not as gloom as you make it look like :slight_smile:

my 2 cents!

Panagiotis (atmosx) Atmatzidis

email: atma@convalesco.org
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

"As you set out for Ithaca, hope the voyage is a long one, full of adventure, full of discovery [...]" - C. P. Cavafy

···

On 25 Νοε 2014, at 16:49 , bruka <bruka@idatainc.com> wrote:

Its very easy: Install Ruby on Rails – Railsinstaller.org -
GL

···

2014-11-25 16:49 GMT+01:00 bruka <bruka@idatainc.com>:

I have this environment and it is easy once you know the tricks. I can't
give you a full step by step, but I will give you the main bulletpoints to
start your research.

Before we go into it, I want to mention running the app on a Linux VM
(which of course we all do). Getting RoR installed and running on a Linux
server is the easiest of all installations. The trickiest part is getting
shared networking between your host OS (windows 7) and the VM guest.

If you have any knowledge or experience with VirtualBox, get Ubuntu Server
for it, RVM, Ruby, and then follow the endless online tutorials. Once your
VM server is up and running, then you can hit the IP or URL from the
browser of your windows 7.

Installing RoR on windows or Mac is a long and tedious process. The first
time I did it took me close to 3 days, now knowing all I know, it still
takes me at least 3-4 hours.

These are the things you will need:

Apache Server

MySQL (or whatever DB you're using. For mysql see guide below).

Ruby installed with RubyInstaller http://rubyinstaller.org/

The ruby Development Kit from RubyInstaller.
-- I always get the 32 bit versions because they seem to cause less
headaches.

Configure the MySQL connector and libmysql.dll Use this guide:
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

Thin Ruby server http://code.macournoyer.com/thin/ This is the easiest
one to work with on windows. If you are on Linux or Mac you would use
passenger or unicorn.

After you get all that going you can go ahead and put rails and bundler
and all the rest. Every app has certain gem dependencies that you will need
to deal with. There are still a few gems out there that don't play nice on
windows and require extra work. If you encounter one of these, first see if
you can just disable it (:require => false on Bundler).

There is also trickiness regarding apache config, and the windows hosts
file but you should deal with those when you get there. Hope this is enough
info to get you going.

Hi,

I used this (link below) and installed RoR on my Win 7. It was really
easy. But what about MySQL and Apache Server? Can I use XAMPP to solve
problem with the local host. I'm learning ruby till 7-8 mounts but still
new with RoR.

thanks

----- Цитат от Eugeniu T. (eugeniu.rtj@gmail.com), на 25.11.2014
в 22:21 ----- Its very easy: http://railsinstaller.org/en [1]GL
2014-11-25 16:49 GMT+01:00 bruka :
  I have this environment and it is easy once you know the tricks. I can't
give you a full step by step, but I will give you the main bulletpoints to
start your research.
Before we go into it, I want to mention running the app on a Linux VM
(which of course we all do). Getting RoR installed and running on a Linux
server is the easiest of all installations. The trickiest part is getting
shared networking between your host OS (windows 7) and the VM guest.
If you have any knowledge or experience with VirtualBox, get Ubuntu Server
for it, RVM, Ruby, and then follow the endless online tutorials. Once your
VM server is up and running, then you can hit the IP or URL from the
browser of your windows 7.

Installing RoR on windows or Mac is a long and tedious process. The first
time I did it took me close to 3 days, now knowing all I know, it still
takes me at least 3-4 hours.
These are the things you will need:
Apache Server
MySQL (or whatever DB you're using. For mysql see guide below).
Ruby installed with RubyInstaller http://rubyinstaller.org/ [3]
The ruby Development Kit from RubyInstaller. -- I always get the 32 bit
versions because they seem to cause less headaches.
Configure the MySQL connector and libmysql.dll Use this guide:
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
[4]
Thin Ruby server http://code.macournoyer.com/thin/ [5] This is the easiest
one to work with on windows. If you are on Linux or Mac you would use
passenger or unicorn.

After you get all that going you can go ahead and put rails and bundler and
all the rest. Every app has certain gem dependencies that you will need to
deal with. There are still a few gems out there that don't play nice on
windows and require extra work. If you encounter one of these, first see if
you can just disable it (:require => false on Bundler).

There is also trickiness regarding apache config, and the windows hosts
file but you should deal with those when you get there. Hope this is enough
info to get you going.

Links:

···

------
[1] http://railsinstaller.org/en
[2] mailto:bruka@idatainc.com
[3] http://rubyinstaller.org/
[4]
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
[5] http://code.macournoyer.com/thin/

-------------------------------------

Празнична промоция на хостинг! Неограничен трафик и много екстри с 57% отстъпка!
http://www.superhosting.bg/promo/9years?utm_source=Mail.BG&utm_medium=Footer&utm_content=v2&utm_campaign=9years

What about them? MySQL provides a Windows installer.

I can't think of any reason to run an Apache server in development;
what would you hope to gain from that?

···

On Fri, Nov 28, 2014 at 3:19 AM, <sata@mail.bg> wrote:

But what about MySQL and Apache Server?

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan

I don't know are they necessary to run RoR with localhost. I thought maybe
it will work with xampp. For that reason I asked about them. Sorry, the
question is low- quality.

----- Цитат от Hassan Schroeder (hassan.schroeder@gmail.com), на
28.11.2014 в 17:56 ----- On Fri, Nov 28, 2014 at 3:19 AM, wrote:

But what about MySQL and Apache Server?

What about them? MySQL provides a Windows installer.

I can't think of any reason to run an Apache server in development;
what would you hope to gain from that?

···

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

-------------------------------------
Mail.BG: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар - 20 GB пощенска кутия, 1 GB прикрепен файл, безплатен POP3, мобилна версия, SMS известяване и други. http://mail.bg

It's not that the questions are low quality. It's that that just is
something that has been covered many many times in a boatload of how to's
all over the internet.

In general , there is no need to run apache or mysql or even postgresql on
a localhost for development. Most of your development needs will be met
using the ruby on rails installer for windows, or using the plethora of
ways to install on any of your unix platforms. The only time you would
probably need to use apache or mysql, or even postgresql, would be because
you are coding for some *very* specific aspect of that *particular*
database engine, or webserver.

99% of this conversation is moot if you work for a company as they
generally tend to standardize the tool sets allowing developers the laxity
of using their preferred editor only. For 'home' use either a virtual
machine such as VirtualBox or VMWare, or a 'native' install such as with
the windows Ruby or RoR installers are sufficient to learn both Ruby, and
the Ruby on Rails framework.

Don't make this harder than it needs to be. There are a couple of minor
details that differ platform to platform, however, these are usually
detailed in the tutorials available just about anywhere.

I'm sure you know to look for the most *recent* tutorial you can find
closest to your search day. I'm also sure you're not going to just use
whatever tutorial you find, but will instead use the one you find most
commonly referred to when researching. I mention this just so it can't be
said it was never mentioned.

···

On Dec 1, 2014 10:57 AM, "Boris" <sata@mail.bg> wrote:

I don't know are they necessary to run RoR with localhost. I thought
maybe it will work with xampp. For that reason I asked about them. Sorry,
the question is low- quality.

----- Цитат от Hassan Schroeder (hassan.schroeder@gmail.com), на
28.11.2014 в 17:56 -----

On Fri, Nov 28, 2014 at 3:19 AM, <sata@mail.bg> wrote:

But what about MySQL and Apache Server?

What about them? MySQL provides a Windows installer.

I can't think of any reason to run an Apache server in development;
what would you hope to gain from that?

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
Hassan Schroeder | about.me
twitter: @hassan

-------------------------------------
Mail.BG <http://mail.bg>: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 20 GB пощенска кутия, 1 GB прикрепен
файл, безплатен POP3, мобилна версия, SMS известяване и други.

Thank you very much for your response and detailad answer! I found FAQ and
tutorials you mentioned. Sorry, I asked hastily.

----- Цитат от D. Deryl Downey (me@daviddwdowney.com), на
01.12.2014 в 18:22 -----

It's not that the questions are low quality. It's that that just is
something that has been covered many many times in a boatload of how to's
all over the internet.

In general , there is no need to run apache or mysql or even postgresql on
a localhost for development. Most of your development needs will be met
using the ruby on rails installer for windows, or using the plethora of
ways to install on any of your unix platforms. The only time you would
probably need to use apache or mysql, or even postgresql, would be because
you are coding for some *very* specific aspect of that *particular*
database engine, or webserver.

99% of this conversation is moot if you work for a company as they
generally tend to standardize the tool sets allowing developers the laxity
of using their preferred editor only. For 'home' use either a virtual
machine such as VirtualBox or VMWare, or a 'native' install such as with
the windows Ruby or RoR installers are sufficient to learn both Ruby, and
the Ruby on Rails framework.

Don't make this harder than it needs to be. There are a couple of minor
details that differ platform to platform, however, these are usually
detailed in the tutorials available just about anywhere.

I'm sure you know to look for the most *recent* tutorial you can find
closest to your search day. I'm also sure you're not going to just use
whatever tutorial you find, but will instead use the one you find most
commonly referred to when researching. I mention this just so it can't be
said it was never mentioned. On Dec 1, 2014 10:57 AM, "Boris" wrote:

I don't know are they necessary to run RoR with localhost. I thought maybe
it will work with xampp. For that reason I asked about them. Sorry, the
question is low- quality.

----- Цитат от Hassan Schroeder (hassan.schroeder@gmail.com [2]),
на 28.11.2014 в 17:56 ----- On Fri, Nov 28, 2014 at 3:19 AM, wrote:

But what about MySQL and Apache Server?

What about them? MySQL provides a Windows installer.

I can't think of any reason to run an Apache server in development;
what would you hope to gain from that?

···

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com [4]
http://about.me/hassanschroeder [5]
twitter: @hassan

-------------------------------------
Mail.BG [6]: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 20 GB
пощенска кутия, 1 GB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.

Links:
------
[1] mailto:sata@mail.bg
[2] mailto:hassan.schroeder@gmail.com
[3] mailto:sata@mail.bg
[4] mailto:hassan.schroeder@gmail.com
[5] http://about.me/hassanschroeder
[6] http://mail.bg

-------------------------------------
Mail.BG: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар - 20 GB пощенска кутия, 1 GB прикрепен файл, безплатен POP3, мобилна версия, SMS известяване и други. http://mail.bg