Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Rails 3 - Windows Vista x64 - Error "different prefix:" - Two Hard Drives

#4113

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'

Reported by Chris Westbrook · March 5th, 2010 @ 04:30 PM

State: new
Milestone: 3.0.6
Assigned to: Yehuda Katz (wycats) Yehuda Katz (wycats)
Importance: Low

Activity

  1. José Valim
    José Valim
    • Assigned user set to Yehuda Katz (wycats)
    • Milestone cleared.

    March 26th, 2010 @ 10:48 PM

  2. Damien White
    Damien White

    Thanks for the workaround Chris, the mklink worked like a charm.

    -Damien

    May 23rd, 2010 @ 08:51 PM

  3. Dave Sanders
    Dave Sanders

    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:inloadable_constants_for_path'
    rack-mount (0.6.4) lib/rack/mount/code_generation.rb:61:in inject'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:358:ineach'
    activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:358:in inject'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:358:inloadable_constants_for_path'
    activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:411:in load_file'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:313:inrequire_or_load'
    activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:455:in load_missing_constant'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:156:inconst_missing'
    activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:154:in each'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:154:inconst_missing'
    activesupport (3.0.0.beta4) lib/active_support/inflector/methods.rb:103:in constantize'<br/> activesupport (3.0.0.beta4) lib/active_support/inflector/methods.rb:102:ineach'
    activesupport (3.0.0.beta4) lib/active_support/inflector/methods.rb:102:in constantize'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:487<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:497:incall'
    activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:497:in default'<br/> activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:497:in[]'
    activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:497:in get'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/routing/route_set.rb:44:incontroller'
    actionpack (3.0.0.beta4) lib/action_dispatch/routing/route_set.rb:23:in call'<br/> rack-mount (0.6.4) lib/rack/mount/route_set.rb:148:incall'
    rack-mount (0.6.4) lib/rack/mount/code_generation.rb:89:in recognize'<br/> rack-mount (0.6.4) lib/rack/mount/code_generation.rb:66:inoptimized_each'
    rack-mount (0.6.4) lib/rack/mount/code_generation.rb:88:in recognize'<br/> rack-mount (0.6.4) lib/rack/mount/route_set.rb:139:incall'
    actionpack (3.0.0.beta4) lib/action_dispatch/routing/route_set.rb:457:in call'<br/> haml (3.0.12) lib/sass/plugin/rack.rb:41:incall'
    actionpack (3.0.0.beta4) lib/action_dispatch/middleware/head.rb:14:in call'<br/> rack (1.1.0) lib/rack/methodoverride.rb:24:incall'
    actionpack (3.0.0.beta4) lib/action_dispatch/middleware/params_parser.rb:21:in call'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/flash.rb:177:incall'
    actionpack (3.0.0.beta4) lib/action_dispatch/middleware/session/abstract_store.rb:106:in call'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/cookies.rb:235:incall'
    activerecord (3.0.0.beta4) lib/active_record/query_cache.rb:31:in call'<br/> activerecord (3.0.0.beta4) lib/active_record/connection_adapters/abstract/query_cache.rb:28:incache'
    activerecord (3.0.0.beta4) lib/active_record/query_cache.rb:11:in cache'<br/> activerecord (3.0.0.beta4) lib/active_record/query_cache.rb:30:incall'
    activerecord (3.0.0.beta4) lib/active_record/connection_adapters/abstract/connection_pool.rb:365:in call'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/callbacks.rb:46:incall'
    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:insend'
    activesupport (3.0.0.beta4) lib/active_support/callbacks.rb:88:in run_callbacks'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/callbacks.rb:44:incall'
    rack (1.1.0) lib/rack/sendfile.rb:105:in call'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/remote_ip.rb:48:incall'
    actionpack (3.0.0.beta4) lib/action_dispatch/middleware/show_exceptions.rb:48:in call'<br/> railties (3.0.0.beta4) lib/rails/rack/logger.rb:14:incall'
    rack (1.1.0) lib/rack/runtime.rb:17:in call'<br/> activesupport (3.0.0.beta4) lib/active_support/cache/strategy/local_cache.rb:72:incall'
    rack (1.1.0) lib/rack/lock.rb:11:in call'<br/> rack (1.1.0) lib/rack/lock.rb:11:insynchronize'
    rack (1.1.0) lib/rack/lock.rb:11:in call'<br/> actionpack (3.0.0.beta4) lib/action_dispatch/middleware/static.rb:30:incall'
    railties (3.0.0.beta4) lib/rails/application.rb:145:in call'<br/> railties (3.0.0.beta4) lib/rails/application.rb:81:insend'
    railties (3.0.0.beta4) lib/rails/application.rb:81:in method_missing'<br/> railties (3.0.0.beta4) lib/rails/rack/log_tailer.rb:15:incall'
    rack (1.1.0) lib/rack/content_length.rb:13:in call'<br/> rack (1.1.0) lib/rack/handler/webrick.rb:48:inservice'
    D:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:in service'<br/> D:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:inrun'
    D:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:in start_thread'<br/> D:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:instart'
    D:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in start_thread'<br/> D:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:instart'
    D:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in each'<br/> D:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:instart'
    D:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:in start'<br/> D:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:instart'
    rack (1.1.0) lib/rack/handler/webrick.rb:14:in run'<br/> rack (1.1.0) lib/rack/server.rb:155:instart'
    railties (3.0.0.beta4) lib/rails/commands/server.rb:62:in start'<br/> railties (3.0.0.beta4) lib/rails/commands.rb:30<br/> railties (3.0.0.beta4) lib/rails/commands.rb:27:intap'
    railties (3.0.0.beta4) lib/rails/commands.rb:27
    script/rails:6:in require'<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?

    June 14th, 2010 @ 02:06 AM

  4. Jeremy Kemper
    Jeremy Kemper
    • Milestone cleared.
    • Importance changed from to Low

    August 30th, 2010 @ 04:10 AM

  5. Jeremy Kemper
  6. Ryan Bigg
    Ryan Bigg

    Automatic cleanup of spam.

    October 19th, 2010 @ 08:34 AM

  7. Santiago Pastorino
  8. Santiago Pastorino
  9. Santiago Pastorino
    Santiago Pastorino
    • Milestone changed from 3.0.5 to 3.0.6

    February 27th, 2011 @ 03:15 AM