Monday, January 31, 2011

Rails Sample App Status (part 3)

My new goal with getting a sample app up and running on my Ubuntu 10.04 vm is to use rails 3.0.3 and ruby version 1.9.2. I had trouble with zlib while installing gems, but found this bit of magic on the rvm site:

$ rvm package install zlib
$ rvm remove 1.9.2
$ rvm install 1.9.2 --with-zlib-dir=$rvm_path/usr

After that it was smooth sailing:

$ rvm use 1.9.2 --default
$ rvm use --create 1.9.2@rails
$ gem install sqlite3-ruby
$ gem install rails

After getting rvm, ruby and rails configured, I decide to try out the devise_example rails application using authentication.

This posed some issues with setup. The documented installation steps didn't quite work. When I executed 'bundle install' in the devise_example directory, the sqlite3 'gem' (which isn't really a gem), failed.

Seems you need this first:

$ sudo apt-get install libsqlite3-dev.

FYI, make sure you have your /etc/apt/apt.conf set up like this:

Acquire::http::proxy "http://user:pw@host.com:8080/"

But you knew that already, right?

A whole lot of issues when I tried to run 'rake devise:setup'. It was complaining about missing file openssl.h. OK, after poking around online I was able to see there were other folks who had a similar issue, but what worked for me was:

$ sudo apt-get install openssl
$ sudo apt-get install libssl-dev

After that, setup was able to finish.




Next comes the fun...trying out the devise_example.





Thursday, January 27, 2011

Rails Sample App Status (part 2)

Whew! Finally got rvm installed after many false starts. Boy, I _love_ open source! No, I really do. Where else can you work on cool technology and solve really challenging puzzles -- together!

Yet again, I had proxy issues. This time I needed to set the proxy in the .gemrc file in my home directory. You need a line like this:

gem: --http-proxy http://username:pw@proxyhost.com:8080

You fill in the blanks for your system if you are working behind a proxy.

The other thing I had to fix was the date. I am still working on getting the date to stay current on my Ubuntu 10.04 virtual machine. I am having network issues, but that's another story.

Because the date was way off, the rvm make step was confused and in an infinite loop filling up my disk with huge log files in the rvm log directory.

After manually setting the date, I was able to fetch and install ruby 1.8.7 and 1.9.2. I set 1.9.2 as the default for now.

Wednesday, January 19, 2011

Random Grails Links

I recently attended a webinar entitled "What's new with Groovy & Grails Tooling in the SpringSource Tool Suite?"

I found it to be somewhat interesting. It was nice to see Grails development in a Eclipse based environment. Though it is still not as refined as Java development, it is a vast improvement.

I asked about whether who can deploy grails applications to vanilla Tomcat as opposed to their tc server. The answer I got was no, not yet. I am not sure whether I like the idea of being forced to use tc server. But I suspect there is more that needs to be discovered. I personally don't know of any technical reasons why a grails application, which is supposed to be just a Java runtime application, can't be deployed to native Tomcat. I guess I can try and see what happens.

Anyway, here is the blurb sent from VMware [bill.anderson@vmware.com] after the presentation. It contains some useful links at the bottom which I intend to dig into. I want to try the eclipse plugin for grails with STS and regular eclipse.

Thank you for joining last week’s webinar “What's new with Groovy & Grails Tooling in the SpringSource Tool Suite?” The webinar recording and slides are now posted.

This webinar covered the recent tooling improvements for Groovy & Grails now available in the SpringSource Tool Suite.

- SpringSource Tool Suite (STS) - provides the best Eclipse-powered development environment for building Spring-powered enterprise applications and supplies tools for all the latest enterprise Java, Spring, Groovy and Grails-based technologies. Also included with STS is the developer edition of vFabric tc Server. Download SpringSource Tool Suite today!

- Grails is an advanced and innovative open source web application platform delivering new levels of developer productivity. Visit www.grails.org to download Grails 1.3.6, view available Grails plugins, and get the latest news.

- Groovy is the leading open source dynamic language for the Java Virtual machine offering a flexible Java-like syntax that most Java developers can learn in a matter of hours. Visit http://groovy.codehaus.org to download Groovy 1.7, read the release notes and access other resources.

Additional resources include:
- STS+Grails FAQ: http://www.grails.org/STS+FAQ
- STS+Grails getting started guide http://www.grails.org/STS+Integration#
- Groovy Eclipse homepage http://groovy.codehaus.org/Eclipse+Plugin
- Best place for help is the STS Forum http://forum.springsource.org/forumdisplay.php?f=32
- SpringSource Team Blog http://blog.springsource.com/