RailRoad is not working. Giving me issues ie /railroad-0.5.0/lib/railroad/app_diagram.rb:54:in `disable_stdout': uninitialized constant

本秂侑毒 提交于 2019-12-29 08:33:27

问题


Here is various outputs

railroad -M | dot -Tsvg > models.svg
/Users/me/.rvm/gems/ruby-1.9.2-p290/gems/railroad-0.5.0/lib/railroad/app_diagram.rb:54:in `disable_stdout': uninitialized constant AppDiagram::PLATFORM (NameError)
from /Users/me/.rvm/gems/ruby-1.9.2-p290/gems/railroad-0.5.0/lib/railroad/app_diagram.rb:72:in `load_environment'
from /Users/me/.rvm/gems/ruby-1.9.2-p290/gems/railroad-0.5.0/lib/railroad/app_diagram.rb:18:in `initialize'
from /Users/me/.rvm/gems/ruby-1.9.2-p290/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:14:in `initialize'
from /Users/me/.rvm/gems/ruby-1.9.2-p290/gems/railroad-0.5.0/bin/railroad:36:in `new'
from /Users/me/.rvm/gems/ruby-1.9.2-p290/gems/railroad-0.5.0/bin/railroad:36:in `<top (required)>'
from /Users/me/.rvm/gems/ruby-1.9.2-p290/bin/railroad:19:in `load'
from /Users/me/.rvm/gems/ruby-1.9.2-p290/bin/railroad:19:in `<main>'

Versions

me$ ruby -v
  ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]
me$ rvm -v
  rvm 1.8.0 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]

me$ rails -v
  Rails 3.0.10

Every command is giving me same issue:

  • railroad -o models.dot -M

  • railroad -a -i -o full_models.dot -M

  • railroad -M | dot -Tsvg > models.svg

  • railroad -C | neato -Tpng > controllers.png

回答1:


Railroad is not working with ruby 1.9.2 and rails 3.0.10. Railroady is advanced maintained version..




回答2:


Edit /Users/me/.rvm/gems/ruby-1.9.2-p290/gems/railroad-0.5.0/lib/railroad/app_diagram.rb at line 54 and change PLATFORM to RUBY_PLATFORM.

See: http://rubyforge.org/tracker/index.php?func=detail&aid=26418&group_id=3383&atid=12998



来源:https://stackoverflow.com/questions/7624457/railroad-is-not-working-giving-me-issues-ie-railroad-0-5-0-lib-railroad-app-di

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!