disruptive tech wrote:
A newbie on Rails…
I am quite experienced at developing fully fledged sites in a variety of
languages - but mainly based around .NET and perl [not together :-)]. I
am considering deploying a new solution in RoR and through pestering
etc, have decided to go for a fully functional data intensive project in
RoR. I have some questions.
Why is mySQL not the typical default DB?
Originally MySQL was the default database, but later the default was
changed to SQLite for development. One advantage of using SQLite for
development is that there is typically nothing to setup. The operating
systems most used for RoR development have SQLite pre-installed and
ready to use.
There’s no user management to worry about when developing with SQLite
and no database configuration to have to mess with.
Explanation by example:
$ rails my_app
$ cd my_app
$ ./script generate scaffold User login:string password:string
$ rake db:migrate
Notice there is no direct database management in the above. Rails takes
care of everything for you.
MySQL is, however, most commonly used for the “production” environment.
Rails provides three environments by default (development, test, &
production). I personally use SQLite for development and test and MySQL
The Rails Object Relational Mapper (ORM) is database agnostic. The
different environments do not have to be on the same type of database
server. Personally, I like having them on different engines because it
reinforces my own code to be database agnostic.
It’s also becoming more popular recently to use NoSQL databases with RoR
such as MongoDB, Redis, etc.
I’m used to building up tables by hand…I’m aware there is a faster way
of doing it in RoR - should I be old fashioned and comfortable or plunge
right in to the Ruby way?
Yes! Plunge right into the Ruby way. You’ll be a happier programmer.
Hosting companies? Can anyone recommend any cheap development servers,
that we can all work remotely?
You don’t need a hosting server to “all work remotely.” All you need is
a shared repository to share the code. RoR is typically developed
entirely locally. I personally use Mongrel to run the app on my local
machine on the default port (http://localhost:3000). There are some
other alternatives like running Passenger locally.
Github is a great solution for hosting your source code repository:
Prob inane questions - but my experience with RoR is zero!
Nope. We probably have all asked those questions when first starting