[OSM-dev] Database Schema

Brett Henderson brett at bretth.com
Thu Oct 9 12:50:45 BST 2008


Brett Henderson wrote:
> Hi Sagar,
>
> I hope to get time to test this at home tonight but hopefully others 
> have better answers in the meantime.
>
> These links might also help in the meantime:
> http://wiki.openstreetmap.org/index.php/The_Rails_Port
> http://wiki.openstreetmap.org/index.php/Rails_on_Fedora
>
> Cheers,
> Brett

I haven't had much luck either.  Does anybody have any suggestions on 
where I've gone wrong below.

I installed the following packages.

yum install ruby ruby-devel ruby-irb ruby-libs ruby-rdoc ruby-ri rubygems ruby-sqlite3
yum install ruby-mysql ruby-postgres ruby-clearsilver ruby-racc subversion-ruby ruby-docs
yum install ruby-activesupport ruby-activerecord
yum install rubygem-rails

The rubygem-rails package is version 2.1.1.  This differs from both the version specified on the fedora specific link above (version 1.2.3) and the version on the rails port page (version 2.0.2).  Perhaps this is the problem.

When I run:
rake db:migrate

I get the error:
Missing the Rails 2.0.2 gem. Please `gem install -v=2.0.2 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

If I comment out the RAILS_GEM_VERSION line in config/environment.rb or set it to version 2.1.1 I get the following stack trace (using rake --trace db:migrate):

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant CGI::Session::SqlSessionStore
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:493:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/session_management.rb:26:in `const_get'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/session_management.rb:26:in `session_store='
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:464:in `send'
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:464:in `initialize_framework_settings'
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:463:in `each'
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:463:in `initialize_framework_settings'
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:460:in `each'
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:460:in `initialize_framework_settings'
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:137:in `process'
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:97:in `send'
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:97:in `run'
/home/brett/work/osm/svn.openstreetmap.org/sites/rails_port/config/environment.rb:28
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require'
/usr/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/tasks/misc.rake:3
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:545:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:545:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:540:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:540:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:500:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:500:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:517:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1182:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1182:in `send'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1182:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:514:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:506:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:500:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:500:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:493:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1930:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1908:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1908:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1908:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1947:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1902:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1947:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1877:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
/usr/bin/rake:16:in `load'
/usr/bin/rake:16

Does anybody have any suggestions?  I'm about to try to install an older version of rails but I'm not how simple that will be.  I'll uninstall the rpm rails package and try installing 2.0.2 via gems.






More information about the dev mailing list