title: Two errors when using Railroad for Rails
body: <p>I've installed the diaspora rails application <a href="https://github.com/diaspora/diaspora" rel="nofollow">https://github.com/diaspora/diaspora</a> on my local machine. Then I installed the Railroads diagram generator <a href="http://railroad.rubyforge.org/#download" rel="nofollow">http://railroad.rubyforge.org/#download</a></p>
  
  <p>Following the instructions on the site, I built a rake task to run it, but appear to be getting two separate errors when I run it.</p>
  
  <p>The first error is the absence of the dot command:</p>
  
  <pre><code>sh: dot: command not found
  </code></pre>
  
  <p>The second error I also get when running without rake:</p>
  
  <pre><code>Seans-MacBook-Pro:diaspora sean$ railroad -o models.dot -M 
  /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspora/gems/railroad-    0.5.0/lib/railroad/app_diagram.rb:54:in `disable_stdout': uninitialized constant     AppDiagram::PLATFORM (NameError)
  </code></pre>
  
  <p>When I run rake:</p>
  
  <pre><code>Seans-MacBook-Pro:diaspora sean$ rake doc:diagrams
  WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
  railroad -i -l -a -m -M | dot -Tsvg | sed 's/font-size:14.00/font-size:11.00/g' &gt;  doc/models.svg
  sh: dot: command not found
  /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspora/gems/railroad-    0.5.0/lib/railroad/app_diagram.rb:54:in `disable_stdout': uninitialized constant    AppDiagram::PLATFORM (NameError)
  from /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspora/gems/railroad-  0.5.0/lib/railroad/app_diagram.rb:72:in `load_environment'
  from /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspora/gems/railroad-0.5.0/lib/railroad/app_diagram.rb:18:in `initialize'
  from /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspora/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:14:in `initialize'
  from /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspora/gems/railroad-0.5.0/bin/railroad:36:in `new'
  from /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspora/gems/railroad-0.5.0/bin/railroad:36:in `&lt;top (required)&gt;'
  </code></pre>
  
  <p>I also modified railroad/app_diagram.rb as per this link <a href="http://rubyforge.org/tracker/index.php?func=detail&amp;aid=26418&amp;group_id=3383&amp;atid=12998" rel="nofollow">http://rubyforge.org/tracker/index.php?func=detail&amp;aid=26418&amp;group_id=3383&amp;atid=12998</a></p>
  
  <p>Now I am getting this error:</p>
  
  <pre><code>Seans-MacBook-Pro:diaspora sean$ rake doc:diagrams
  WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
  railroad -i -l -a -m -M | dot -Tsvg | sed 's/font-size:14.00/font-size:11.00/g' &gt;   doc/models.svg
  dyld: Library not loaded: /usr/lib/libltdl.7.dylib
    Referenced from: /usr/local/bin/dot
    Reason: image not found
    Error loading application environment.
   (Are you running railroad on the aplication's root directory?)
  
  /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspora/gems/railroad-0.5.0/lib/railroad/app_diagram.rb:73:in `require': cannot load such file --    config/environment (LoadError)
  from /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspora/gems/railroad-  0.5.0/lib/railroad/app_diagram.rb:73:in `load_environment'
  from /Users/sean/.rvm/gems/ruby-1.9.3-p194@diaspo
  </code></pre>
  
  <p>I am running from the project root, and the file exists. I also tried adding .rb to the line in the app_diagram.rb file but no change.</p>
  
  <pre><code>Seans-MacBook-Pro:diaspora sean$ pwd
  /Users/sean/Dropbox/rails/diaspora
  
  Seans-MacBook-Pro:diaspora sean$ head -73 /Users/sean/.rvm/gems/ruby-1.9.3-    p194@diaspora/gems/railroad-0.5.0/lib/railroad/app_diagram.rb
   | tail -1
        require "config/environment"
  
  Seans-MacBook-Pro:diaspora sean$ ls -l config/environment.rb
  -rw-r--r--  1 sean  staff  1481 Jul 19 14:25 config/environment.rb
  </code></pre>