# Starting with RoR

**URL:** <https://www.ruby-forum.com/t/starting-with-ror/192031>\
**Category:** Rails\
**Created:** [July 22, 2010, 3:51pm UTC](https://www.ruby-forum.com/t/starting-with-ror/192031 "2010-07-22T15:51:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![disruptive](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@disruptive](https://www.ruby-forum.com/u/disruptive)\
**Post date:** [July 22, 2010, 3:51pm UTC](https://www.ruby-forum.com/t/starting-with-ror/192031/1 "2010-07-22T15:51:14Z")

</div>

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?  
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?  
Hosting companies? Can anyone recommend any cheap development servers,  
that we can all work remotely?

Prob inane questions - but my experience with RoR is zero!

Thanks.

---

<div class="post-metadata">

**Author:** ![disruptive](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@disruptive](https://www.ruby-forum.com/u/disruptive)\
**Post date:** [July 22, 2010, 4:04pm UTC](https://www.ruby-forum.com/t/starting-with-ror/192031/2 "2010-07-22T16:04:16Z")

</div>

> Why is mySQL not the typical default DB?

Because SQLite is easier to install/maintain on a developer’s machine.  
It’s  
easy enough to switch to MySQL when creating a project:

rails my\_project -d mysql

> 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?

Look in to ActiveRecord Migrations and “rake db:migrate”. When you say  
“building up tables” if you mean initial data entry, look in to  
ActiveRecord  
Seed data and “rake db:seed”.

> Hosting companies? Can anyone recommend any cheap development servers,  
> that we can all work remotely?

In the UK, I’d recommend [Bytemark.co.uk](http://Bytemark.co.uk) - outside the UK, you’d need to  
give  
more information on where you are 🙂

> Prob inane questions - but my experience with RoR is zero!

I’m sure we’ll all help you on here. Providing you post detailed  
questions  
(including any error messages, what you’ve tried etc) you’re bound to  
get  
helpful answers.

Cheers,

Andy

---

<div class="post-metadata">

**Author:** ![disruptive](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@disruptive](https://www.ruby-forum.com/u/disruptive)\
**Post date:** [July 22, 2010, 4:13pm UTC](https://www.ruby-forum.com/t/starting-with-ror/192031/3 "2010-07-22T16:13:28Z")

</div>

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.

Welcome

> 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  
first\_name:string last\_name:string  
$ rake db:migrate  
$ ./script/server

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  
for production.

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](http://localhost:3000)). There are some  
other alternatives like running Passenger locally.

Github is a great solution for hosting your source code repository:

> **[GitHub: Let’s build from here](https://github.com)**
>
> GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea...

> Prob inane questions - but my experience with RoR is zero!

Nope. We probably have all asked those questions when first starting  
out.

---

<div class="post-metadata">

**Author:** ![disruptive](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@disruptive](https://www.ruby-forum.com/u/disruptive)\
**Post date:** [July 22, 2010, 6:25pm UTC](https://www.ruby-forum.com/t/starting-with-ror/192031/4 "2010-07-22T18:25:01Z")

</div>

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 :-)].

Forget all that, er, stuff - embrace the Rails MVC architecture. (yes,  
I’m a hybrid, do both .net and Rails, drives me crazy switching back and  
forth at times)

> 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.

Excellent!

> 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?

Embrace the Rails way… migrations are your friend.

---

<div class="post-metadata">

**Author:** ![disruptive](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@disruptive](https://www.ruby-forum.com/u/disruptive)\
**Post date:** [July 22, 2010, 4:47pm UTC](https://www.ruby-forum.com/t/starting-with-ror/192031/5 "2010-07-22T16:47:00Z")

</div>

I wouldn’t normally post silly little corrections/typos, but as the OP  
was a  
newbie (and might play with it, type the code in and fail to get it all  
to  
work):

> $ ./script generate scaffold User login:string password:string  
> first\_name:string last\_name:string

Should be:

$ ./script/generate scaffold User login:string password:string

> first\_name:string last\_name:string

Cheers,

Andy
