datamapper / dm-types

DataMapper plugin providing extra data types
http://datamapper.org/
MIT License
55 stars 80 forks source link

undefined method `/' for #<Pathname:0x0000000263f6f8> (NoMethodError) #17

Closed hedgehog closed 13 years ago

hedgehog commented 13 years ago

Appreciate any insight into what is causing this: the stdlib Pathname seems to be loaded and the stdlib docs makes no mention of a / method:

undefined method `/' for #<Pathname:0x0000000263f6f8> (NoMethodError)
/home/hedge/.rvm/gems/ruby-1.9.2-p136@bbb_vm_monitor/gems/dm-types-0.10.0/lib/dm-types.rb:5:in `<module:Types>'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@bbb_vm_monitor/gems/dm-types-0.10.0/lib/dm-types.rb:4:in `<module:DataMapper>'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@bbb_vm_monitor/gems/dm-types-0.10.0/lib/dm-types.rb:3:in `<top (required)>'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@bbb_vm_monitor/gems/data_mapper-0.9.2/lib/data_mapper.rb:7:in `require'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@bbb_vm_monitor/gems/data_mapper-0.9.2/lib/data_mapper.rb:7:in `block in <top (required)>'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@bbb_vm_monitor/gems/data_mapper-0.9.2/lib/data_mapper.rb:5:in `each'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@bbb_vm_monitor/gems/data_mapper-0.9.2/lib/data_mapper.rb:5:in `<top (required)>'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `each'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `block in require'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `each'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `require'
/home/hedge/.rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler.rb:120:in `require'
/usr/src/bigbluebutton/labs/vm/development/features/monitor/config/boot.rb:10:in `<top (required)>'
/home/hedge/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/hedge/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/src/bigbluebutton/labs/vm/development/features/monitor/features/support/env.rb:2:in `<top (required)>'
snusnu commented 13 years ago

Your version of DataMapper is really old (current version is 1.1 with 1.1.1 being just around the corner). If it's an option for you, try upgrading and the problem will be gone. However, it's only fair to note that an upgrade from 0.9.2 to 1.1 probably won't go without at least some breakage. The various release notes in between should cover the changes you need to make tho.

In general, and iirc, Pathname#/ was provided by extlib so you could start out by grepping that source for the exact file to require. I'd be surprised if DM-1.1 still suffers from that problem (the dependency on extlib has been removed).

I'm closing this issue now. In general, please file DM issues (for the latest version) at http://datamapper.lighthouseapp.com/projects/20609-datamapper

hedgehog commented 13 years ago

bizarre, that gem versioning is what I got from bundler install of a project Gemfile generated by Padrino... go figure. Thanks.

tmilewski commented 13 years ago

It should be noted that the "data_mapper" gem is ver 0.9.2 while the "datamapper" is the current one.

That said, the official DataMapper documentation says to use "data_mapper" which is clearly incorrect:

http://datamapper.org/getting-started

Just thought I'd point that out.

bioform commented 13 years ago

I have this issue with data_mapper ver. 1.1.0

#   File    Line    Location
0   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/dm-types-0.10.0/lib/dm-types.rb    5   in `'
1   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/dm-types-0.10.0/lib/dm-types.rb    4   in `'
2   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/dm-types-0.10.0/lib/dm-types.rb    3   in `'
3   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/data_mapper-0.9.2/lib/data_mapper.rb   7   in `require'
4   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/data_mapper-0.9.2/lib/data_mapper.rb   7   in `block in '
5   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/data_mapper-0.9.2/lib/data_mapper.rb   5   in `each'
6   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/data_mapper-0.9.2/lib/data_mapper.rb   5   in `'
7   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb  68  in `require'
8   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb  68  in `block (2 levels) in require'
9   /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb  66  in `each'
10  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb  66  in `block in require'
11  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb  55  in `each'
12  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb  55  in `require'
13  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler.rb  120 in `require'
14  /opt/reestr/config/boot.rb  10  in `'
15  config.ru   1   in `require'
16  config.ru   1   in `block in '
17  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.2/lib/rack/builder.rb 51  in `instance_eval'
18  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.2/lib/rack/builder.rb 51  in `initialize'
19  config.ru   1   in `new'
20  config.ru   1   in `'
21  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb  222 in `eval'
22  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb  222 in `load_rack_app'
23  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb  156 in `block in initialize_server'
24  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/utils.rb 572 in `report_app_init_status'
25  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb  153 in `initialize_server'
26  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb   204 in `start_synchronously'
27  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb   180 in `start'
28  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb  128 in `start'
29  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 253 in `block (2 levels) in spawn_rack_application'
30  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server_collection.rb    132 in `lookup_or_add'
31  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 246 in `block in spawn_rack_application'
32  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server_collection.rb    82  in `block in synchronize'
33      prelude>    10:in `synchronize'
34  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server_collection.rb    79  in `synchronize'
35  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application'
36  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application'
37  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application'
38  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb   357 in `server_main_loop'
39  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb   206 in `start_synchronously'
40  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/helper-scripts/passenger-spawn-server
Bastes commented 12 years ago

I've just also been fooled by the data_mapper =/= datamapper thing ; could someone correct the ?

Thanks in advance.

solnic commented 12 years ago

Actually no, both gems are the same and there are 2 because of historical reasons heh. We will remove datamapper gem soon. So people should be using data_mapper.