Rails Apps from a KeydriveOne of the CRUSERS posted an excellent work around, for those who’d like to try out Ruby or Rails at work, but do not have “admin” rights on their Windows PCs.
Displaying articles with tag
Posted by admin, Wed Apr 19 06:32:30 UTC 2006
Posted by admin, Thu Apr 13 05:32:54 UTC 2006
So, this is my “live from Vancouver” Canada on Rails blog. Registration was predictably busy, but they pumped people through the line quickly. The venue is cramped, and hot. This room is undoubtedly over it’s official fire-regulation limits. People standing around the edges for the first talk, but they brought in more chairs (there was room? for more chairs) in the break.
DHH gave the keynote speech. You can probably find MULTIPLE versions of one of his slides up on Flickr(warning:NSFW) already. He seems to (at the same time) embrace and resent the term “arrogant”, which has been universally applied to him, and that slide is his response. OTOH, his talk was interesting, and he presented his vision for Rails well.
More to follow…
Next day. Sorry, I ran out of power before I had a chance to blog again. I have a better seat today, since I arrived 35 minutes early, and claimed a seat by a wall plug.
Back to yesterday. Basically good presentations. I felt sorry for Joe O’Brien. He had to follow DHH’s talk, and his presentation was all about the Enterprise. Not the best placement for his talk. Lunch was less than memorable. Note to Nathan. Charge a few more bucks next time, and supply better food.
Kyle Shanks (Mr. RadRails) presented, not to surprisingly, an introduction to RadRails. He is showing signs of actually being an effective speaker, something which was not universally true of the rest of the roster. Since I’ve been using RadRails off and on, there was nothing new there for me, but I’m sure that others were more interested than I.
Then we had back-to-back talks on testing. These were interesting. Dave Astels’ talk about Behavior Driven Development was more about the future of testing Rails applications rSpec looks really interesting. When it’s further along, I may have to consider refactoring our tests to use it. The second talk, given by Steven Baker, was more of a nuts-and-bolts talk about testing in your Rails application today. I find it bizarre that more people don’t do testing. I can’t even imagine developing my applications without tests anymore.
Ok, now we get to the weird part. A talk by David Black. Topic changed at the last minute. IMHO, this was a big mistake. I was interesting in the talk he was originally supposed to give, and completely bored and turned off by the talk he actually gave. Note I said… IMHO. Bumped into an old coworker, who lives and works in Vancouver now, and he LOVED this talk. Like I said. Weird.
From the beginning, I was looking forward to Amy Hoy’s introductory talk about AJAX, and I was not disappointed. Although I learned very little that was new (since we’ve been using AJAX for months), she is a very entertaining and engaging speaker. Having read some of her blogs, I would have expected this, but it does not always follow that good writers are good speakers. Amy is good. Ok, IMHO, Amy is good. That weird friend of mine decided he didn’t like Amy’s talk. I guess there is no accounting for taste. ;-)
Ok, I confess. I skipped the last talk. No need to convince anyone to let me use Rails on my next project, since I already am.
I’ll get to today’s talks later.
Posted by admin, Mon Apr 03 03:38:56 UTC 2006
Rubernate is an object-oriented storage for Ruby objects based on relational database.
For all you Hibernate addicts…
Posted by admin, Sun Apr 02 16:12:05 UTC 2006
Continuous Integration Server Feature Matrix – DamageControl – Confluence
Stumbled across this great comparison of continuous integration tools. If it stays up-to-date, this will be a great way of figuring out which tool works best for your next project.
Posted by admin, Thu Mar 30 04:21:19 UTC 2006
Grails aims to bring the “coding by convention” paradigm to Groovy. It’s an open-source web application framework that leverages the Groovy language and complements Java Web development. You can use Grails as a standalone development environment that hides all configuration details or integrate your Java business logic
It will be interesting to see where this project goes. My gut feel, without having looked deeply into either project, leads me to believe that Grails (based on a scripting language) stands a better chance of succeeding than Trails. I’d love to see someone compare the two projects.
Posted by admin, Tue Mar 28 06:37:54 UTC 2006
Rails 1.1: RJS, Active Record++, respond_to, integration tests, and 500 other things!
Upgrading from 1.0
So with such a massive update, upgrading is going to be hell, right? Wrong! We’ve gone to painstaking lengths to ensure that upgrading from 1.0 will be as easy as pie. Here goes the steps:
* Update to Rails 1.1:
gem install rails—include-dependencies
* Update JavaScripts for RJS:
rake rails:update
Not so much. I could NOT get the gem install command to complete successfully. And… why the heck use “install” anyway, when there is an “update”, and I have Rails 1.0 installed already?
So, I tried:<br />gem update rails -y<br />
And it worked. Perfectly. First time.
Posted by admin, Mon Mar 13 10:39:04 UTC 2006
Ok, that was really annoying. Setting up a new build server just should not take as long as this did.
What is ContinuousBuilder you ask? Good question. If I had not bought the beta-book Rails Recipes, I would never have heard of it. A Google search on the topic brings up… yup, you guessed it, the source code for ContinuousBuilder, and nothing else. ContinuousBuilder is a plugin for Rails, that is a very (very) simple continuous integration implementation. You can install it in your Rails app by using:ruby script/plugin install continuous_builderIf you read the accompanying README.txt, you’ll know about as much as I did when I started. On to the meaty stuff. Couple of things about ContinuousBuilder and Subversion you should know before you start…
- ContinuousBuilder will not send email to you on success. So when everything is working, you get no feedback. And when it is really, really broken, you get… no feedback. This is not good, especially when you are setting up ContinuousBuilder for the first time. And, with a small team, I prefer to get emails for every commit, just so I know the build really is working. The answer was simple. First, in test_build.rake, I added a deliver_success call:
[code lang=”ruby”]
case build.run
when :failed
ContinuousBuilder::Notifier.deliver_failure(build, notice_options)
when :revived
ContinuousBuilder::Notifier.deliver_revival(build, notice_options)
when :broken
ContinuousBuilder::Notifier.deliver_broken(build, notice_options)
when :unchanged, :succesful
# Smile, be happy, it’s all good
ContinuousBuilder::Notifier.deliver_success(build, notice_options)
end
[/code] Then, in the continuous_builder.rb file, under Notifier, I added a success method
[code lang=”ruby”]
def success(build, options, sent_at = Time.now)
@subject = “[#{options[:application_name]}] Build working (##{build.checkout.current_revision})”
@body = [ build.checkout.last_commit_message, build.output ].join(“nn”)
@recipients, @from, @sent_on = options[:recipients], options[:sender], sent_at
end
[/code]
Now I get messages for every commit, good or bad.
- In Subversion, when your post-commit hook is not working, you get ZERO feedback for what is wrong. This is can be quite a time waster. But I finally found this nugget in the Subversion FAQ, that helps solve that problem:
subversion: Subversion FAQWhy aren’t my repository hooks working?They’re supposed to invoke external programs, but the invocations never seem to happen.
Before Subversion calls a hook script, it removes all variables
- including $PATH on Unix, and PATH on Windows -from the environment. Therefore, your script can only run another program if you spell out that program’s absolute name.Debugging tips:
If you’re using Linux or Unix, try running the script “by hand”, by following these steps:
1. Use “su”, “sudo”, or something similar, to become the user who normally would run the script. This might be httpd or www-data, for example, if you’re using Apache; it might be a user like svn if you’re running svnserve and a special Subversion user exists. This will make clear any permissions problems that the script might have. 2. Invoke the script with an empty environment by using the the “env” program. Here’s an example for the post-commit hook:
$ env – ./post-commit /var/lib/svn-repos 1234
Note the first argument to “env” is a dash; that’s what ensures the environment is empty. 3. Check your console for errors.
I hope that more people discover and use this very simple continuous integration plugin. It looks promising, but it needs a little more polish.
Posted by admin, Thu Mar 02 08:56:01 UTC 2006
Sometimes, it’s the little things that trip you up. I’m using my new CoreDuo iMac, and some of the tools I use on my Powerbook are not available on the Intel machine. No problem, I’m flexible.
So… SCPlugin for Finder – not working. Look for alternate Subversion GUI… eventually concede that TextMate is cheap and has support built in, so I break down and buy it (finally) and … hmmm.
Why are all the Subversion menu items disabled. Puzzle. Puzzle. (think Grinch here, people). Read the manual. Nothing. Read the FAQ. Nothing. Google search the mailing lists. Nothing. Puzzle. Puzzle.
Ok. Bright idea time. Maybe TextMate HAS Subversion support, but it isn’t installed by default. Read up on bundles in the manual. Figure out how to download the Subversion bundle. Do it. Restart TextMate. Works!
Why was this so hard? Because everything I read stated that TextMate had “built-in” Subversion support. It just did not occur to me that meant – “built-in-but-you-have-to-download-and-install-it-separately”. Maybe stuff like this should be up front in the manual?!
Posted by admin, Thu Mar 02 07:20:39 UTC 2006
Dump or Slurp YAML Reference Data (and Fixtures) | Ruby on Rails for Newbies
Dump or Slurp YAML Reference Data (and Fixtures)
And one more problem with ar_fixtures. We were using it to dump data out of an Oracle test database, to transfer to MySQL. Two of the columns failed to “dump” properly. A column defined in Oracle as “NUMBER” failed to export. As did another column defined as “NUMBER”. Instead of the numeric data expected, we got a bunch of :
!ruby/object{}