Upgrading to the new gitorious

35 views
Skip to first unread message

Thomas

unread,
May 13, 2009, 4:51:46 PM5/13/09
to Gitorious
Hi,

thanks for the tips you provided on the upgrade page in gitorious-
wiki. They helped a lot for setting up the new gitorious. I managed to
solve a few issues, but finally i stuck at getting sessions running.

A few notes to the upgrade difficulties - at least for a rails noob
like me (actually i used the stompserver, perhaps my tips are not
necessary when using ActiveMQ):
- Get your stompserver running (gem install stompserver, then start
it up)
- You need memcached installed (aptitude install memcached)
- Copy config/broker.yml.example to config/broker.yml (I didn't need
to change anything there)
- As the login & register page needs ssl, you have to setup a
gitorious-ssl site in apache

The problems i couldn't solve yet:
- db-migration aborted (see below [1])
- The session management doesn't work. After typing in my login or
registering a new user, I'm redirected to 500 error page. I even don't
get a message from the server what's going on :-( Could be some
problem with the apache server, but starting script/server doesn't
help either, because the login/register links are broken due to ssl
usage.

Any ideas?

Greets, Thomas

[1]:
$ RAILS_ENV=production rake db:migrate --trace
(in /var/lib/gitorious2)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
rake aborted!
undefined method `reenable' for <Rake::Task db:schema:dump =>
[environment]>:Rake::Task
/var/lib/gitorious2/vendor/rails/railties/lib/tasks/databases.rake:253
/usr/lib/ruby/1.8/rake.rb:546:in `call'
/usr/lib/ruby/1.8/rake.rb:546:in `execute'
/usr/lib/ruby/1.8/rake.rb:541:in `each'
/usr/lib/ruby/1.8/rake.rb:541:in `execute'
/usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:494:in `invoke'
/var/lib/gitorious2/vendor/rails/railties/lib/tasks/databases.rake:117
/usr/lib/ruby/1.8/rake.rb:546:in `call'
/usr/lib/ruby/1.8/rake.rb:546:in `execute'
/usr/lib/ruby/1.8/rake.rb:541:in `each'
/usr/lib/ruby/1.8/rake.rb:541:in `execute'
/usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:494:in `invoke'
/usr/lib/ruby/1.8/rake.rb:1931:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1909:in `each'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1903:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1881:in `run'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1878:in `run'
/usr/bin/rake:28

Marius Mårnes Mathiesen

unread,
May 14, 2009, 2:53:53 AM5/14/09
to gito...@googlegroups.com
Thomas,
Thanks for a great writeup, this will probably be useful for other
folks upgrading/installing Gitorious on their own systems. I've added
a few comments below.

On 13. mai. 2009, at 22.51, Thomas wrote:
> - You need memcached installed (aptitude install memcached)

If you don't want to use memcached, you may use another session
store. In the relevant environment file (probably config/environments/
production.rb), change the line

config.cache_store = :mem_cache_store, "localhost"

to for instance

config.cache_store = :memory_store

to use the memory store instead. There's an article covering the cache
stores in Rails at http://thewebfellas.com/blog/2008/6/9/rails-2-1-now-with-better-integrated-caching
. Installing memcached is probably a good idea for a production
environment, though.

> - As the login & register page needs ssl, you have to setup a
> gitorious-ssl site in apache

Actually, you can skip the SSL requirement. If you add the line

SslRequirement.disable_ssl_check = true

into (for instance) <gitorious_root>/config/environments/
production.rb, the SSL requirement will be skipped.

> The problems i couldn't solve yet:
> - db-migration aborted (see below [1])

From your stack trace below it seems you need to update Rake on your
system. If you've installed Rake through rubygems, use `[sudo] gem
install rake`, of course replace sudo with whatever fits your system
best.

Good luck!

- Marius

Thomas Schamm

unread,
May 14, 2009, 3:31:35 AM5/14/09
to gito...@googlegroups.com
Hi Marius,

thanks for your comments!

Actually, I installed rake 0.8.5 yesterday, but I had rake 0.8.1
installed as debian-package too. I removed the package and now the
migrate works fine. Deactivating SSL & memcached both works fine too,
but I still can't create new sessions, i.e. using login or register
pages.

Any advices?

Greets, Thomas

Marius Mårnes Mathiesen

unread,
May 14, 2009, 3:36:45 AM5/14/09
to gito...@googlegroups.com
On 14. mai. 2009, at 09.31, Thomas Schamm wrote:

> Actually, I installed rake 0.8.5 yesterday, but I had rake 0.8.1
> installed as debian-package too. I removed the package and now the
> migrate works fine. Deactivating SSL & memcached both works fine
> too, but I still can't create new sessions, i.e. using login or
> register pages.
>
> Any advices?


Could you have a look in the logfile (log/production.log) and paste
the trace generated there?

Cheers
- Marius

Thomas Schamm

unread,
May 14, 2009, 4:14:20 AM5/14/09
to gito...@googlegroups.com
Sorry, i forgot to paste the trace, here it is. Perhaps it's a problem
with passenger 2.06, i'm trying 2.2.2 now and tell my results if it's
running then.

Greets, Thomas

Status: 500 Internal Server Error
undefined method `rewind' for #<IO:0xb554909c>
/var/lib/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:150:in `POST'
/var/lib/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:
15:in `call'
/var/lib/gitorious2/vendor/rails/actionpack/lib/action_controller/
params_parser.rb:15:in `call'
/var/lib/gitorious2/vendor/rails/railties/lib/rails/rack/metal.rb:
47:in `call'
/var/lib/gitorious2/vendor/rails/actionpack/lib/action_controller/
session/abstract_store.rb:122:in `call'
/var/lib/gitorious2/vendor/rails/activerecord/lib/active_record/
query_cache.rb:29:in `call'
/var/lib/gitorious2/vendor/rails/activerecord/lib/active_record/
connection_adapters/abstract/query_cache.rb:34:in `cache'
/var/lib/gitorious2/vendor/rails/activerecord/lib/active_record/
query_cache.rb:9:in `cache'
/var/lib/gitorious2/vendor/rails/activerecord/lib/active_record/
query_cache.rb:28:in `call'
/var/lib/gitorious2/vendor/rails/activerecord/lib/active_record/
connection_adapters/abstract/connection_pool.rb:361:in `call'
/var/lib/gitorious2/vendor/rails/activesupport/lib/active_support/
cache/strategy/local_cache.rb:24:in `call'
/var/lib/gitorious2/vendor/rails/actionpack/lib/action_controller/
failsafe.rb:11:in `call'
/var/lib/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/var/lib/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in
`synchronize'
/var/lib/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/var/lib/gitorious2/vendor/rails/actionpack/lib/action_controller/
dispatcher.rb:106:in `call'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/rack/
request_handler.rb:65:in `process_request'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_request_handler.rb:165:in `main_loop'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/railz/
application_spawner.rb:321:in `start_request_handler'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/railz/
application_spawner.rb:282:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/utils.rb:
163:in `safe_fork'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/utils.rb:
161:in `fork'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/utils.rb:
161:in `safe_fork'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/railz/
application_spawner.rb:280:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/utils.rb:
163:in `safe_fork'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/utils.rb:
161:in `fork'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/utils.rb:
161:in `safe_fork'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/railz/
application_spawner.rb:279:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_server.rb:317:in `__send__'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_server.rb:317:in `main_loop'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_server.rb:168:in `start_synchronously'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_server.rb:135:in `start'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_server.rb:112:in `fork'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_server.rb:112:in `start'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/railz/
application_spawner.rb:179:in `start'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
spawn_manager.rb:222:in `spawn_rails_application'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
spawn_manager.rb:217:in `synchronize'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
spawn_manager.rb:217:in `spawn_rails_application'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
spawn_manager.rb:126:in `spawn_application'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
spawn_manager.rb:251:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_server.rb:317:in `__send__'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_server.rb:317:in `main_loop'
/var/lib/gems/1.8/gems/passenger-2.0.6/lib/passenger/
abstract_server.rb:168:in `start_synchronously'
/var/lib/gems/1.8/gems/passenger-2.0.6/bin/passenger-spawn-server:
46

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Gitorious" group.
> To post to this group, send email to gito...@googlegroups.com
> To unsubscribe from this group, send email to gitorious+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/gitorious?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

Thomas Schamm

unread,
May 14, 2009, 4:33:25 AM5/14/09
to gito...@googlegroups.com
Hi Marius,

it seems passenger 2.0.6 does not work for the new gitorious. Version
2.2.2 works fine!

Thank you very much.

Reply all
Reply to author
Forward
0 new messages