This project is archived and is in readonly mode.

#1557 ✓resolved
Ian White

loading config/environment from outside rails root raises error

Reported by Ian White | December 11th, 2008 @ 03:42 AM | in 2.x

This problem arises for example when loading the rails env in a plugin test

for example (in a fresh rails edge app)


cd vendor
ruby ../config/environment.rb

produces


/Users/ian/dev/ianwhite/resources_controller/.garlic/rails__origin_master/vendor/rails/actionpack/lib/action_view/template.rb:111:in `find_full_path': Missing template rescues/_request_and_response.erb in view path vendor/rails/actionpack/lib/action_controller/templates (ActionView::MissingTemplate)
	from /Users/ian/dev/ianwhite/resources_controller/.garlic/rails__origin_master/vendor/rails/actionpack/lib/action_view/template.rb:12:in `initialize'
	from /Users/ian/dev/ianwhite/resources_controller/.garlic/rails__origin_master/vendor/rails/actionpack/lib/action_view/paths.rb:130:in `new'
	from /Users/ian/dev/ianwhite/resources_controller/.garlic/rails__origin_master/vendor/rails/actionpack/lib/action_view/paths.rb:130:in `create_template'
	from /Users/ian/dev/ianwhite/resources_controller/.garlic/rails__origin_master/vendor/rails/actionpack/lib/action_view/paths.rb:125:in `templates_in_path'
	from /Users/ian/dev/ianwhite/resources_controller/.garlic/rails__origin_master/vendor/rails/actionpack/lib/action_view/paths.rb:124:in `each'
	from /Users/ian/dev/ianwhite/resources_controller/.garlic/rails__origin_master/vendor/rails/actionpack/lib/action_view/paths.rb:124:in `templates_in_path'
	from /Users/ian/dev/ianwhite/resources_controller/.garlic/rails__origin_master/vendor/rails/actionpack/lib/action_view/paths.rb:112:in `reload!'
	from /Users/ian/dev/ianwhite/resources_controller/.garlic/rails__origin_master/vendor/rails/actionpack/lib/action_view/paths.rb:49:in `initialize'
	 ... 6 levels...
	from ../config/../vendor/rails/railties/lib/initializer.rb:144:in `process'
	from ../config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
	from ../config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
	from ../config/environment.rb:9

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Referenced by

Pages