S
srinivasan.anand
=20
Hi all,
Got struck up with this. Please help.
=20
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).=20
=20
"puredisk_development:
adapter: postgresql
database: ca
port: 10085
username: ***
password: ***
=20
reporting_development:
adapter: oracle
username: ***
password: ***
database: ***
"
=20
The error which I am getting when I am running the command "railroad -M
-v -o models" is=20
=20
/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
=20
=20
This "pd.rb" in the error uses the postgre db conection.
The contents of the pd.rb file are=20
=20
"
class PD < ActiveRecord::Base
connection =3D "puredisk_#{ENV['RAILS_ENV']}"
establish_connection connection.to_sym
end
=20
class PD:olicy < PD; set_table_name 'policy'; end
class PD:sinpolicies < PD; set_table_name 'dsinpolicies'; end
class PD:ataselection < 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:olicyrun < PD; set_table_name 'policyrun'; end
class PD:stemplate < PD; set_table_name 'dataselectiontemplate'; end
class PD:olicytype < PD; set_table_name 'policytype'; end
"
=20
And the rails_env is "development"
=20
Thanks in advance ..
=20
Regards,
Anand.
=20
=20
=20
=20
=20
=20
=20
=20
=20
=20
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.
Hi all,
Got struck up with this. Please help.
=20
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).=20
=20
"puredisk_development:
adapter: postgresql
database: ca
port: 10085
username: ***
password: ***
=20
reporting_development:
adapter: oracle
username: ***
password: ***
database: ***
"
=20
The error which I am getting when I am running the command "railroad -M
-v -o models" is=20
=20
/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
=20
=20
This "pd.rb" in the error uses the postgre db conection.
The contents of the pd.rb file are=20
=20
"
class PD < ActiveRecord::Base
connection =3D "puredisk_#{ENV['RAILS_ENV']}"
establish_connection connection.to_sym
end
=20
class PD:olicy < PD; set_table_name 'policy'; end
class PD:sinpolicies < PD; set_table_name 'dsinpolicies'; end
class PD:ataselection < 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:olicyrun < PD; set_table_name 'policyrun'; end
class PD:stemplate < PD; set_table_name 'dataselectiontemplate'; end
class PD:olicytype < PD; set_table_name 'policytype'; end
"
=20
And the rails_env is "development"
=20
Thanks in advance ..
=20
Regards,
Anand.
=20
=20
=20
=20
=20
=20
=20
=20
=20
=20
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.