Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lighthouse-import opened this issue May 16, 2011 · 9 comments

Comments

@lighthouse-import
Copy link

commented May 16, 2011

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/4113
Created by Chris Westbrook - 2010-11-17 01:58:30 UTC

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'

@lighthouse-import

This comment has been minimized.

Copy link
Author

commented May 16, 2011

Imported from Lighthouse.
Comment by Damien White - 2010-05-23 19:51:48 UTC

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

-Damien

@lighthouse-import

This comment has been minimized.

Copy link
Author

commented May 16, 2011

Imported from Lighthouse.
Comment by Dave Sanders - 2010-06-14 01:06:04 UTC

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' 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' 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' 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' 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' 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' 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' 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' activesupport (3.0.0.beta4) lib/active_support/dependencies.rb:487 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' 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' 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' 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' 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' 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' 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' 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' 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' 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' 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' 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' 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' 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' actionpack (3.0.0.beta4) lib/action_dispatch/middleware/callbacks.rb:44:incall'
rack (1.1.0) lib/rack/sendfile.rb:105:in call' 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' railties (3.0.0.beta4) lib/rails/rack/logger.rb:14:incall'
rack (1.1.0) lib/rack/runtime.rb:17:in call' 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' rack (1.1.0) lib/rack/lock.rb:11:insynchronize'
rack (1.1.0) lib/rack/lock.rb:11:in call' 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' railties (3.0.0.beta4) lib/rails/application.rb:81:insend'
railties (3.0.0.beta4) lib/rails/application.rb:81:in method_missing' 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' rack (1.1.0) lib/rack/handler/webrick.rb:48:inservice'
D:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:in service' D:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:inrun'
D:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:in start_thread' D:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:instart'
D:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in start_thread' D:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:instart'
D:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in each' D:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:instart'
D:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:in start' D:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:instart'
rack (1.1.0) lib/rack/handler/webrick.rb:14:in run' rack (1.1.0) lib/rack/server.rb:155:instart'
railties (3.0.0.beta4) lib/rails/commands/server.rb:62:in start' railties (3.0.0.beta4) lib/rails/commands.rb:30 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'
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?

@lighthouse-import

This comment has been minimized.

Copy link
Author

commented May 16, 2011

Imported from Lighthouse.
Comment by Jeremy Kemper - 2010-08-30 03:10:32 UTC

[bulk edit]

@lighthouse-import

This comment has been minimized.

Copy link
Author

commented May 16, 2011

Imported from Lighthouse.
Comment by Jeremy Kemper - 2010-10-15 22:01:47 UTC

[bulk edit]

@lighthouse-import

This comment has been minimized.

Copy link
Author

commented May 16, 2011

Imported from Lighthouse.
Comment by Ryan Bigg - 2010-10-19 07:34:24 UTC

Automatic cleanup of spam.

@lighthouse-import

This comment has been minimized.

Copy link
Author

commented May 16, 2011

Imported from Lighthouse.
Comment by Santiago Pastorino - 2010-11-15 21:15:12 UTC

[bulk edit]

@lighthouse-import

This comment has been minimized.

Copy link
Author

commented May 16, 2011

Imported from Lighthouse.
Comment by Santiago Pastorino - 2011-02-12 21:58:21 UTC

[bulk edit]

@lighthouse-import

This comment has been minimized.

Copy link
Author

commented May 16, 2011

Imported from Lighthouse.
Comment by Santiago Pastorino - 2011-02-27 03:15:38 UTC

[bulk edit]

jake3030 pushed a commit to jake3030/rails that referenced this issue Jun 28, 2011
@p-kolacz

This comment has been minimized.

Copy link

commented Sep 20, 2013

What is the status of this bug? Will it be fixed, because it's closed and I'm still experiencing it when I @import 'bootstrap'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.