Saturday, March 7, 2009

Spike Edge

‹prev | My Chain | next›

I cannot resist the opportunity to mess about with edge rails a little bit while working through my chain. Besides, I did not convince my employer to spend all that money on Peepcode (and the CouchDB screencast) not to at least give it a try.

If I were really pushing to get this to production, I think I am comfortable enough with Sinatra at this point. But, can't resist...

Ariejan de Vroom has a nice write-up on running with edge rails. The write-up is so good that there is no sense in my repeating is here. Besides, I just need it about for a quick spike:
cstrom@jaynestown:~/repos/eee-code$ git submodule add git://github.com/rails/rails.git vendor/rails
Initialized empty Git repository in /home/cstrom/repos/eee-code/vendor/rails/.git/
remote: Counting objects: 95278, done.
remote: Compressing objects: 100% (21434/21434), done.
remote: Total 95278 (delta 73619), reused 94410 (delta 72754)
Receiving objects: 100% (95278/95278), 17.16 MiB | 159 KiB/s, done.
Resolving deltas: 100% (73619/73619), done.
cstrom@jaynestown:~/repos/eee-code$ ruby vendor/rails/railties/bin/rails .
exists
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
create config/initializers
create config/locales
create db
create doc
create lib
create lib/tasks
create log
create public/images
create public/javascripts
create public/stylesheets
create script/performance
...
I am not going to get much more done tonight, but I would at least like to get the necessary gems installed for CouchDB. Following along with the peepcode screencast, I add the following config.gem entries to environment.rb:
  config.gem 'rest-client',      :lib => "rest_client"
config.gem "jchris-couchrest", :lib =gt; "couchrest"
config.gem "json"
When I try a rake gems:install, though, I get this:
cstrom@jaynestown:~/repos/eee-code$ rake gems:install
(in /home/cstrom/repos/eee-code)
gem install jchris-couchrest
ERROR: could not find gem jchris-couchrest locally or in a repository
Gack! I just recently upgraded to rubygems 1.3 and have yet to re-add github to my gem sources:
cstrom@jaynestown:~/repos/eee-code$ gem sources -a http://gems.github.com
http://gems.github.com added to sources
Now, both rake gems:install and rake gems:unpack work fine:
cstrom@jaynestown:~/repos/eee-code$ rake gems:install
(in /home/cstrom/repos/eee-code)
gem install jchris-couchrest
WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
/usr/bin aren't both writable.
Successfully installed jchris-couchrest-0.16
1 gem installed
cstrom@jaynestown:~/repos/eee-code$ rake gems:unpack
(in /home/cstrom/repos/eee-code)
WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
/usr/bin aren't both writable.
Unpacked gem: '/home/cstrom/repos/eee-code/vendor/gems/rest-client-0.9'
Unpacked gem: '/home/cstrom/repos/eee-code/vendor/gems/jchris-couchrest-0.16'
Unpacked gem: '/home/cstrom/repos/eee-code/vendor/gems/json-1.1.3'

What's Next

Now that I think about it, I may have wasted a bit of time tonight. I think I wanted Rails unstable instead of edge (wanted to play with some of the upcoming Merb goodness).

Ah well, as long as I am doing something, I am not wasting time (at least in the chain's eyes). I'll ruminate on whether to continue with edge or switch to unstable tomorrow.

No comments:

Post a Comment