Note to self
Rails does a lot of “automagic” stuff, and there seems to be a lack of documentation on how the piping behind that works. For example, there’s the strange fact that you can set up variables in a template that can then be used in it’s layout… so investigated the rendering sequence a bit.
Sometimes it seems that ruby still has a way to go in terms of maturity. Today I got a strange error message when trying to build the rdoc files:
uninitialized constant RubyToken::AlreadyDefinedToken (NameError)
Any idea what it means? It turns out that I forgot to remove a require 'ruby-debug' somewhere in the code, which in turn includes some files from irb, which in turn is incompatible with rdoc. Duh…
For the last two posts, a spend half the day researching Ruby weirdness instead, quite “unproductively” instead of hacking in a solution for my original problem.
After posting the two entries, I went back to my code, and was able to make the unit tests pass by just deleting four characters…
This really took me hours, because no matter how you configure RadRails with Locomotive, it will hate you. It won’t recognise the rails commands, even if configured, and claim that it found none of the tools. I guess it’s because it relies on some path settings from the environment, that are not accessible from the GUI. So you’re stuck. Unless you do the following:
- Open Locomotive
- Open the Terminal from Locomotive, so that it has all the path settings
- Start RadRails from the command line, like this: