Hi all,
Got struck up with this. Please help.
The actual requirement is that I am trying to generate a model diagram
thru the railroad which I have installed in my machine. I use both
oracle and postgre db’s in the db connection (database.yml file).
"puredisk_development:
adapter: postgresql
database: ca
port: 10085
username: ***
password: ***
reporting_development:
adapter: oracle
username: ***
password: ***
database: ***
"
The error which I am getting when I am running the command “railroad -M
-v -o models” is
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support
/dependencies.rb:249:in `load_missing_constant’: Expected
config/…/app/models/pd.rb to define Pd (LoadError)
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support
/dependencies.rb:452:in `const_missing’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support
/dependencies.rb:464:in `const_missing’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support
/inflector.rb:250:in `constantize’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support
/core_ext/string/inflections.rb:148:in `constantize’
from
/usr/local/lib/ruby/gems/1.8/gems/railroad-0.4.0/lib/railroad/models_dia
gram.rb:25:in `generate’
from
/usr/local/lib/ruby/gems/1.8/gems/railroad-0.4.0/lib/railroad/models_dia
gram.rb:24:in `each’
from
/usr/local/lib/ruby/gems/1.8/gems/railroad-0.4.0/lib/railroad/models_dia
gram.rb:24:in `generate’
from
/usr/local/lib/ruby/gems/1.8/gems/railroad-0.4.0/bin/railroad:40
from /usr/local/bin/railroad:16:in `load'
from /usr/local/bin/railroad:16
This “pd.rb” in the error uses the postgre db conection.
The contents of the pd.rb file are
"
class PD < ActiveRecord::Base
connection = “puredisk_#{ENV[‘RAILS_ENV’]}”
establish_connection connection.to_sym
end
class PD::Policy < PD; set_table_name ‘policy’; end
class PD::Dsinpolicies < PD; set_table_name ‘dsinpolicies’; end
class PD::Dataselection < PD; set_table_name ‘dataselection’; end
class PD::Agent < PD; set_table_name ‘agent’; end
class PD::Job < PD; set_table_name ‘job’; end
class PD::Policyrun < PD; set_table_name ‘policyrun’; end
class PD::Dstemplate < PD; set_table_name ‘dataselectiontemplate’; end
class PD::Policytype < PD; set_table_name ‘policytype’; end
"
And the rails_env is “development”
Thanks in advance …
Regards,
Anand.
This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete
the original. Any other use of the email by you is prohibited.