Scoped Thoughts

Felipe Rodrigues's blog

Ruby 1.9.1, MySQL and Rails on Ubuntu 9.0.4

With the release of Rails 2.3.3 I decided to upgrade my rails projects. Not enough, I decided to upgrade to Ruby 1.9 as well.
So, here is my first impressions:

Ubuntu packages don't have a stable version of Ruby 1.9. They are still offering 1.9.0 and I heard 1.9.1 is much better and stable.
The solution was compile and install from the source.
so, just:

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz

Then just:
tar xzf ruby-1.9.1-p243.tar.gz

and
cd ruby-1.9.1-p243

and
./configure

and
make

and
sudo make install

If everything went fine, you can just remove the src folder where did extracted you tar.gz. This will replace your ruby commando, pointing to ruby 1.9.1. To check that, please, verify with
ruby -v

Now you just need to install some gems to make your new ruby world rock. First, install Rails:
sudo gem install rails

 Then, install your database adapters gems:
sudo gem install sqlite3-ruby pg

For mysql, try this: (Wasn't working when I wrote this post)
sudo gem install mysql

If don't work, then you will have to build it from source. Project page at http://www.tmtm.org/en/mysql/ruby
So
wget 'http://rubyforge.org/frs/download.php/51087/mysql-ruby-2.8.1.tar.gz'

then untar the file with
tar xzf mysql-ruby-2.8.1.tar.gz

access the directory you just extracted and do
ruby extconf.rb --with-mysql-config

and
make

Before finish, you can run a test to make sure it works. (You will need to install the test-unit gem):
ruby ./test.rb -- localhost your_user its_password the_database

If everything works as expected, just issue
sudo make install

And that's it. Hope it works well for you and you can enjoy the performance of Ruby 1.9.1

Filed under  //   mysql   rails   ruby   ruby 1.9.1  

Rails Magazine: A lovely initiative

I've in contact with rails community more frequently lately since I started a new rails project. Before that I was in some Groovy/Grails and Java projects.

Grails and Rails are so similar and both can do basically the same thing. Of course there are situations where one of them will be a best fit for some project.
Besides the technical differences are not so big, the concept of how do things in the framework are not so big either.

The big difference comes in form of community. The rails community is bigger and better than Grails. I don't want in any aspect to degrade the Grails community. They are just like any open source community. But rails community is just different. There are some idealism and they  honor  that in each blog post or each initiative.

A great example is the Rails Magazine. They have a great magazine with actual articles and still offers the PDF version for free (check http://railsmagazine.com/).
Now, Groovy/Grails has a great magazine as well (http://groovymag.com/) but these are not free. The difference in this case is that for Groovy Magazine you have to pay USD $4,99 for the PDF version.

What others differences you see from these communities? What you have to say in favor of Groovy/Grails community?

PS: Please, note that I'm not saying that GroovyMag is wrong in charge. They have this right. I just want to highlight how free and idealist is the Rails community using this example.

Railsmagazine128x128

Filed under  //   community   rails