Preparing to Build a Rails App

24 10 2007

I’ve been thinking for some time about building a system to organize all of the papers I need (or just want) to read, whether I’ve read them, etc., along with some indexing and tagging system so I can search for papers both by topic, and by my motivation for reading them.

As I’ve been enjoying playing with Ruby lately while working on crawling online postings of course textbooks for Mocha, and there’s been so much hullabaloo about Ruby on Rails, I’ve decided to give Rails a shot.

The instructions given for getting up and running are pretty straightforward, and short. Downloading, building, and installing Ruby was no problem. Downloading and installing RubyGems was also without incident. Pretty smooth so far. The next step in the instructions looks very straightforward: run gem install rails –include-dependencies. This yielded an error about not finding the rails package, which seems like a pretty big problem for one of Ruby’s flagship apps. Googling revealed that for some reason, you need to purge and regenerate your package cache sometimes before this works. So I did that. Still, no luck, but the error this time is that the package server refused my connection. More googling yielded the helpful suggestion “Your error message seems like a Rubyforge problem. It happens occasionally. Just try it again later.” For something that bills itself as being akin to apt-get, it has a long way to go when a user’s first interaction is:

[colin@sliver:~/Desktop/rubygems-0.9.4]$ gem install rails --include-dependencies
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (Gem::GemNotFoundException)
    Could not find rails (> 0) in any repository
[colin@sliver:~/Desktop/rubygems-0.9.4]$ gem env
RubyGems Environment:
  - VERSION: 0.9.4 (0.9.4)
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  - GEM PATH:
     - /usr/local/lib/ruby/gems/1.8
  - REMOTE SOURCES:
     - http://gems.rubyforge.org
[colin@sliver:~/Desktop/rubygems-0.9.4]$ rm -f /usr/local/lib/ruby/gems/1.8/source_cache
[colin@sliver:~/Desktop/rubygems-0.9.4]$ gem install rails --include-dependencies
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (Gem::GemNotFoundException)
    Could not find rails (> 0) in any repository
[colin@sliver:~/Desktop/rubygems-0.9.4]$ gem update
Updating installed gems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Gems: [] updated
[colin@sliver:~/Desktop/rubygems-0.9.4]$ gem install rails --include-dependencies
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ECONNREFUSED reading http://gems.rubyforge.org/gems/rake-0.7.3.gem
[colin@sliver:~/Desktop/rubygems-0.9.4]$ gem install rails --include-dependencies
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ECONNREFUSED reading http://gems.rubyforge.org/gems/actionwebservice- 1.2.5.gem
[colin@sliver:~/Desktop/rubygems-0.9.4]$ gem install rails --include-dependencies
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ECONNREFUSED reading http://gems.rubyforge.org/gems/rails-1.2.5.gem
[colin@sliver:~/Desktop/rubygems-0.9.4]$ gem install rails --include-dependencies
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ECONNREFUSED reading http://gems.rubyforge.org/gems/rails-1.2.5.gem
[colin@sliver:~/Desktop/rubygems-0.9.4]$ gem install rails --include-dependencies
Successfully installed rails-1.2.5
[colin@sliver:~/Desktop/rubygems-0.9.4]$

Hm. At least the next step to generate a simple rails app works fine.

Advertisements




A Ham Sandwich in Your Computer

18 07 2007

And so begins yet another attempt at a consistent blog. I’ll explain the title another time – it’s an inside joke which developed over the course of this current summer in California among my housemates and me.

I’m beginning this blog for a few reasons. I did used to blog in high school, though it was full of teenage angst and such, and consequently did not make very good reading material. I stopped shortly after entering college, but still missed writing periodically (and have subsequently noticed a decrease in the quality of my writing). I also tend to have a lot of random ideas which I’d like to record somewhere for me to come back to them. I’d also like some sort of public forum to share some opinions I’ve developed over time, and perhaps get some feedback on them.

I’ve been contemplating this for some time, though the real trigger for it was blogging at work – http://blogs.sun.com/csg/. I’m currently doing an internship in the Solaris Kernel group at Sun, and they encourage everyone to blog. That got me back into the habit again, and hopefully I’ll manage to continue this for some time to come.

I’ll likely end up writing my own blogging software at some point, and moving away from Blogger, because:

  • I am guilty, so some degree, of NIH (Not Invented Here)
  • It’s an opportunity to get comfortable with another programming language (I’d likely use Python or Ruby, though possibly Scheme)
  • If I want to extend it in some way, I don’t have to use PHP…

I’ll probably write here about random thoughts, CS papers, software, ideas for projects, reviews of books, movies, and music, reflections on certain experience, etc. I’m going to try to keep each entry (after this one) fairly focused on a particular topic.