Rails: Developing on Win7?

Looking to learn Rails but hoping to stick with Win7/xp as all of the
machines I work on run one of those two OSs. Would hate to be stuck to
my laptop for development b/c its the only machine I have running
ubuntu. Am I shooting myself in the foot by trying to learn rails on
windows?

On Fri, Jan 21, 2011 at 6:06 PM, Ben Giordano
[email protected]wrote:

Looking to learn Rails but hoping to stick with Win7/xp as all of the
machines I work on run one of those two OSs. Would hate to be stuck to
my laptop for development b/c its the only machine I have running
ubuntu. Am I shooting myself in the foot by trying to learn rails on
windows?

No, but starting out use Instant Rails or the like… even though when
you
are learning even getting things fully working on Mac can take a bit of
a
learning curve, but at least on Mac you have a lot of support… that
said,
if you really fall in love with Rails, do ditch windows and if you have
the
choice avoid deploying on Windows server, do it! Also you may want to
consider using a Linux vm (i.e. Ubuntu) on your windows machines…
another
option.

I haven’t had a chance to try this out, but it looks very promising.

it was featured in an article on Ruby Inside
http://www.rubyinside.com/rails-installer-ruby-and-rails-on-windows-in-a-single-install-4201.html

I have been developing in Windows for a while now and it’s true that
there is no much support or love for it in the RoR world. If you
really want to keep going with Windows, though, if I were you I would
get the rubyinstaller and DevKit right away from
Downloads.
To install DevKit follow instructions at
Development Kit · oneclick/rubyinstaller Wiki · GitHub.

Most of the problems I have had working with Windows were because of
the DB adapters.

To work with MS SQL you will need 2 gems:
activerecord-sqlserver-adapter
ruby-odbc

Working with MS SQL you will probably want to stick to ODBC so you
will need to create a System DSN. In Windows 7 first try to create it
the regular way but it probably will not work. If it does not work
then you will need to delete what you just created and then use the
executable at C:\Windows\SysWOW64\odbcad32.exe. This is the 32-bit
version.

To work with Oracle you will also need 2 gems:
activerecord-oracle_enhanced-adapter
ruby-oci8

Good luck

Ben Giordano wrote in post #976696:

Looking to learn Rails but hoping to stick with Win7/xp as all of the
machines I work on run one of those two OSs. Would hate to be stuck to
my laptop for development b/c its the only machine I have running
ubuntu. Am I shooting myself in the foot by trying to learn rails on
windows?

Yes. Windows is not a suitable platform for serious server-side
software development. At the very least you’ll want a *nix VM.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Sent from my iPhone

if you are looking into using Ubuntu, check out this screencast
http://www.rubyinside.com/how-to-install-ruby-1-9-2-and-rails-3-0-on-ubuntu-10-10-4148.html
or use the one line installer http://www.rubyinside.com/ its the latest
article.

Jason


Jason
Sent with Sparrow

Genius, thank you all for your great responses. I have been lurking
around many resources online and feel like Ubuntu is the best way to
go for learning rails. Will take a bit of work to get up and running
but seems like a much better decision in the long run.

thanks,

Ben

Ben Giordano wrote in post #976992:

Genius, thank you all for your great responses. I have been lurking
around many resources online and feel like Ubuntu is the best way to
go for learning rails.

Actually, Mac OS is probably the best way to go, but Ubuntu will work
well. I’ve also heard good things about VirtualRails, which is a Mint
Linux VM with a Rails dev environment preinstalled.

Will take a bit of work to get up and running
but seems like a much better decision in the long run.

Yes. (Anything that lessens your use of Windows is probably a good
decision.)

Miscellaneous tips:

  • Use RVM. Use RVM. Use RVM.
  • On Ubuntu, install gems through the Gem program, not the system
    package manager (even if you’re not using RVM).
  • Do all development test-first, preferably with RSpec and Cucumber.
    Avoid Rails’ built-in fixtures at all costs; use factories instead.
  • Use version control religiously (I highly recommend Git).
  • http://www.railstutorial.org and http://www.railscasts.com are
    invaluable.
  • The hidden advantage of Rails is the Ruby language. Learn it very
    well. http://www.railsapi.com , besides presenting the Rails docs more
    readably than the official site, has the Ruby standard library docs in
    the same format. Win.
  • Don’t try to use a Rails 2 book to learn Rails 3.
  • Learn SQL well if you don’t already know it; likewise for database
    normalization strategies. ActiveRecord exists to aid DB access, not to
    obviate learning SQL.
  • Always use the Foreigner gem to create foreign key constraints in your
    DB. The lack of core support for this is a major oversight in Rails,
    which is why Foreigner is so useful.
  • Rails tends to make good things easy and bad things hard. If it’s
    hard, you’re probably doing it wrong.

Good luck! Rails development can be exhilarating.

thanks,

Ben

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Sent from my iPhone