This project is archived and is in readonly mode.
Rails 3 - Windows Vista x64 - Error "different prefix:" - Two Hard Drives
Reported by Chris Westbrook | March 5th, 2010 @ 04:30 PM | in 3.0.6
This unique situation comes from having your Ruby on Rails project on one hard drive and your bundler gems installed by default on another drive.
I have confirmed with Bundler Dev that this issue is coming from Rails and probably ActiveSupport
This issue was resolved by creating a system link and launching
rails server from within the 'new' system link folder.
C:>mklink /D c:\ra200 "D:\ra200"
* Error Message:
different prefix: "D:/" and
"C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/builtin/rails_info"
The command you ran to generate exception(s)
ruby script/rails server
(Then access your Rails project)
The exception backtrace(s)
D:/Ruby19/lib/ruby/1.9.1/pathname.rb:742:in relative_path_from'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:357:inblock
in loadable_constants_for_path'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:355:in
each'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:355:ininject'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:355:in
loadable_constants_for_path'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:408:inload_file'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:310:in
require_or_load'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:452:inload_missing_constant'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:153:in
block in const_missing'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:151:ineach'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:151:in
const_missing'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/inflector/methods.rb:112:inblock
in constantize'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/inflector/methods.rb:111:in
each'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/inflector/methods.rb:111:inconstantize'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/routing/route_set.rb:47:in
controller'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/routing/route_set.rb:25:incall'
rack-mount (0.5.2) lib/rack/mount/recognition/route_set.rb:75:in
block in call' rack-mount (0.5.2)
lib/rack/mount/recognition/code_generation.rb:99:inblock in
recognize'
rack-mount (0.5.2)
lib/rack/mount/recognition/code_generation.rb:76:in optimized_each'
rack-mount (0.5.2)
lib/rack/mount/recognition/code_generation.rb:98:inrecognize'
rack-mount (0.5.2) lib/rack/mount/recognition/route_set.rb:66:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/routing/route_set.rb:417:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activerecord/lib/active_record/query_cache.rb:29:in
block in call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:incache'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activerecord/lib/active_record/query_cache.rb:9:in
cache'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activerecord/lib/active_record/query_cache.rb:28:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:365:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/head.rb:14:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/methodoverride.rb:24:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/params_parser.rb:20:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/flash.rb:167:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb:107:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/cookies.rb:205:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/callbacks.rb:46:inblock
in call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/callbacks.rb:429:in
_run_call_callbacks'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/callbacks.rb:88:inrun_callbacks'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/callbacks.rb:44:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/sendfile.rb:105:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/remote_ip.rb:48:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:62:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/rack/logger.rb:13:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/runtime.rb:17:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/lock.rb:11:in
block in call' <internal:prelude>:8:insynchronize'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/lock.rb:11:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/static.rb:30:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application.rb:91:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application.rb:41:inmethod_missing'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/rack/log_tailer.rb:15:in
call'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/content_length.rb:13:incall'
C:/Users/Christopher/.bundle/ruby/1.9.1/bundler/gems/rack-7f693f2e7da5dbeb0403886fdee49dbe39a6beda-master/lib/rack/handler/webrick.rb:48:in
service'
D:/Ruby19/lib/ruby/1.9.1/webrick/httpserver.rb:111:inservice'
D:/Ruby19/lib/ruby/1.9.1/webrick/httpserver.rb:70:in run'
D:/Ruby19/lib/ruby/1.9.1/webrick/server.rb:183:inblock in
start_thread'
Comments and changes to this ticket
-
José Valim March 26th, 2010 @ 10:48 PM
- Assigned user set to Yehuda Katz (wycats)
- Milestone cleared.
-
Damien White May 23rd, 2010 @ 08:51 PM
Thanks for the workaround Chris, the mklink worked like a charm.
-Damien
-
Dave Sanders June 14th, 2010 @ 02:06 AM
FYI, this isn't just when the files are on two different drives. Here I have the error cropping up even though ruby is installed on my D: drive, which also where my rails app and sever are running from.
different prefix: "d:/" and "D:/Ruby187/lib/ruby/gems/1.8/gems/declarative_authorization-0.4.1/app/controllers"
Rails.root: d:/git/PestNow/PestNow
D:/Ruby187/lib/ruby/1.8/pathname.rb:723:in
relative_path_from'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:360:in
loadable_constants_for_path'
rack-mount (0.6.4) lib/rack/mount/code_generation.rb:61:ininject'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:358:in
each'
activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:358:ininject'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:358:in
loadable_constants_for_path'
activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:411:inload_file'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:313:in
require_or_load'
activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:455:inload_missing_constant'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:156:in
const_missing'
activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:154:ineach'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:154:in
const_missing'
activesupport (3.0.0.beta4) lib/active_support/inflector/methods.rb:103:inconstantize'<br/> activesupport (3.0.0.beta4) lib/active_support/inflector/methods.rb:102:in
each'
activesupport (3.0.0.beta4) lib/active_support/inflector/methods.rb:102:inconstantize'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:487<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:497:in
call'
activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:497:indefault'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:497:in
[]'
activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:497:inget'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/routing/route_set.rb:44:in
controller'
actionpack (3.0.0.beta4) lib/action_dispatch/routing/route_set.rb:23:incall'<br/> rack-mount (0.6.4) lib/rack/mount/route_set.rb:148:in
call'
rack-mount (0.6.4) lib/rack/mount/code_generation.rb:89:inrecognize'<br/> rack-mount (0.6.4) lib/rack/mount/code_generation.rb:66:in
optimized_each'
rack-mount (0.6.4) lib/rack/mount/code_generation.rb:88:inrecognize'<br/> rack-mount (0.6.4) lib/rack/mount/route_set.rb:139:in
call'
actionpack (3.0.0.beta4) lib/action_dispatch/routing/route_set.rb:457:incall'<br/> haml (3.0.12) lib/sass/plugin/rack.rb:41:in
call'
actionpack (3.0.0.beta4) lib/action_dispatch/middleware/head.rb:14:incall'<br/> rack (1.1.0) lib/rack/methodoverride.rb:24:in
call'
actionpack (3.0.0.beta4) lib/action_dispatch/middleware/params_parser.rb:21:incall'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/flash.rb:177:in
call'
actionpack (3.0.0.beta4) lib/action_dispatch/middleware/session/abstract_store.rb:106:incall'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/cookies.rb:235:in
call'
activerecord (3.0.0.beta4) lib/active_record/query_cache.rb:31:incall'<br/> activerecord (3.0.0.beta4) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in
cache'
activerecord (3.0.0.beta4) lib/active_record/query_cache.rb:11:incache'<br/> activerecord (3.0.0.beta4) lib/active_record/query_cache.rb:30:in
call'
activerecord (3.0.0.beta4) lib/active_record/connection_adapters/abstract/connection_pool.rb:365:incall'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/callbacks.rb:46:in
call'
activesupport (3.0.0.beta4) lib/active_support/callbacks.rb:414:in_run_call_callbacks'<br/> activesupport (3.0.0.beta4) lib/active_support/callbacks.rb:88:in
send'
activesupport (3.0.0.beta4) lib/active_support/callbacks.rb:88:inrun_callbacks'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/callbacks.rb:44:in
call'
rack (1.1.0) lib/rack/sendfile.rb:105:incall'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/remote_ip.rb:48:in
call'
actionpack (3.0.0.beta4) lib/action_dispatch/middleware/show_exceptions.rb:48:incall'<br/> railties (3.0.0.beta4) lib/rails/rack/logger.rb:14:in
call'
rack (1.1.0) lib/rack/runtime.rb:17:incall'<br/> activesupport (3.0.0.beta4) lib/active_support/cache/strategy/local_cache.rb:72:in
call'
rack (1.1.0) lib/rack/lock.rb:11:incall'<br/> rack (1.1.0) lib/rack/lock.rb:11:in
synchronize'
rack (1.1.0) lib/rack/lock.rb:11:incall'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/static.rb:30:in
call'
railties (3.0.0.beta4) lib/rails/application.rb:145:incall'<br/> railties (3.0.0.beta4) lib/rails/application.rb:81:in
send'
railties (3.0.0.beta4) lib/rails/application.rb:81:inmethod_missing'<br/> railties (3.0.0.beta4) lib/rails/rack/log_tailer.rb:15:in
call'
rack (1.1.0) lib/rack/content_length.rb:13:incall'<br/> rack (1.1.0) lib/rack/handler/webrick.rb:48:in
service'
D:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:inservice'<br/> D:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in
run'
D:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:instart_thread'<br/> D:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in
start'
D:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:instart_thread'<br/> D:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in
start'
D:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:ineach'<br/> D:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in
start'
D:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:instart'<br/> D:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in
start'
rack (1.1.0) lib/rack/handler/webrick.rb:14:inrun'<br/> rack (1.1.0) lib/rack/server.rb:155:in
start'
railties (3.0.0.beta4) lib/rails/commands/server.rb:62:instart'<br/> railties (3.0.0.beta4) lib/rails/commands.rb:30<br/> railties (3.0.0.beta4) lib/rails/commands.rb:27:in
tap'
railties (3.0.0.beta4) lib/rails/commands.rb:27
script/rails:6:inrequire'<br/> script/rails:6
hope it helps, basically putting me to a standstill - I don't see how to mklink my way out of this one?
-
Jeremy Kemper August 30th, 2010 @ 04:10 AM
- Milestone cleared.
- Importance changed from to Low
-
Santiago Pastorino February 27th, 2011 @ 03:15 AM
- Milestone changed from 3.0.5 to 3.0.6
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>