Topic: Railroad problem

i'm using railroad to make model and controller diagrams off my rails application.
The sad thing is that it doesn't work!

here is the code from the ubuntu terminal:

raphael@raphael-laptop:~/NetBeansProjects/trunk$ railroad -v-M
Loading application environment
Loading application classes
/home/raphael/NetBeansProjects/trunk/vendor/plugins/model_translations/lib/active_record/model_translations.rb:14: warning: already initialized constant ComcontentTranslation
/home/raphael/NetBeansProjects/trunk/vendor/plugins/model_translations/lib/active_record/model_translations.rb:14: warning: already initialized constant ArticleTranslation
Error loading model classes.
  (Are you running railroad on the aplication's root directory?)

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- RMagick (MissingSourceFile)
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
  from /home/raphael/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
  from /home/raphael/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
  from /home/raphael/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
  from ./app/models/article_image.rb:1
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
  from /home/raphael/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
  from /home/raphael/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
  from /home/raphael/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
  from /usr/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:40:in `load_classes'
  from /usr/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:40:in `each'
  from /usr/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:40:in `load_classes'
  from /usr/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/railroad/app_diagram.rb:21:in `initialize'
  from /usr/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:14:in `initialize'
  from /usr/lib/ruby/gems/1.8/gems/railroad-0.5.0/bin/railroad:36:in `new'
  from /usr/lib/ruby/gems/1.8/gems/railroad-0.5.0/bin/railroad:36
  from /usr/bin/railroad:19:in `load'
  from /usr/bin/railroad:19

Can anyone help me with this or give me another soltion to make class diagrams for rails apps?

many tnx

Re: Railroad problem

Apparently you are missing a gem, RMagick.. make sure you have that installed and loaded into your environment.

RMagick is an interface between ruby and imagemagick (You need to have that too).

Re: Railroad problem

can you be a little bit more specific?

Re: Railroad problem

raphvan wrote:

can you be a little bit more specific?

This line in your rails stack trace says it can't load "RMagic" here:

...`gem_original_require': no such file to load -- RMagick (MissingSourceFile)

so you need to install that gem...


1. List all available ruby gems that start with string "rmagick" from gems.rubyforge.org:

raphael@raphael-laptop:~/$ gem list rmagick -r
*** REMOTE GEMS ***
rmagick (2.12.2)
rmagick4j (0.3.7, 0.3.4)
raphael@raphael-laptop:~/$

2. Install the rmagick gem:

raphael@raphael-laptop:~/$ sudo gem install rmagick
Password: *******
........ the gem gets installed ..........
........ and you're on your merry way ....
raphael@raphael-laptop:~/$