diff --git a/config/initializers/_mongo.rb b/config/initializers/_mongo.rb index 41a2098c0..3f51d8765 100644 --- a/config/initializers/_mongo.rb +++ b/config/initializers/_mongo.rb @@ -4,8 +4,8 @@ ENV['MONGODB_URL'] = ENV['MONGOHQ_URL'] || URI::Generic.build(:scheme => 'mongodb', :host => APP_CONFIG['mongo_host'], :port => APP_CONFIG['mongo_port'], :path => "/diaspora-#{Rails.env}").to_s -MongoMapper.config = {RAILS_ENV => {'uri' => ENV['MONGODB_URL']}} -MongoMapper.connect RAILS_ENV +MongoMapper.config = {::Rails.env => {'uri' => ENV['MONGODB_URL']}} +MongoMapper.connect ::Rails.env if defined?(PhusionPassenger) PhusionPassenger.on_event(:starting_worker_process) do |forked| diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 620547cd5..b012b3f74 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -105,7 +105,6 @@ Devise.setup do |config| # scope, setting true below. # Note that devise does not generate default routes. You also have to # specify them in config/routes.rb - config.use_default_scope = true # Configure the default scope used by Devise. By default it's the first devise # role declared in your routes. diff --git a/config/routes.rb b/config/routes.rb index 2d043682d..5959f21bb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -34,24 +34,16 @@ Diaspora::Application.routes.draw do match 'set_backer_number', :to => "dev_utilities#set_backer_number" match 'set_profile_photo', :to => "dev_utilities#set_profile_photo" - #routes for devise, not really sure you will need to mess with this in the future, lets put default, - #non mutable stuff in anohter file - #match 'login', :to => 'devise/sessions#new', :as => "new_user_session" - #match 'logout', :to => 'devise/sessions#destroy', :as => "destroy_user_session" - #match 'signup', :to => 'registrations#new', :as => "new_user_registration" + #signup + match 'get_to_the_choppa', :to => redirect("/users/sign_up") - #match 'get_to_the_choppa', :to => redirect("/signup") #public routes - # - - match 'webfinger', :to => 'publics#webfinger' - match 'hcard/users/:id', :to => 'publics#hcard' - - match 'hub', :to => 'publics#hub' - + match 'webfinger', :to => 'publics#webfinger' + match 'hcard/users/:id', :to => 'publics#hcard' match '.well-known/host-meta',:to => 'publics#host_meta' - match 'receive/users/:id', :to => 'publics#receive' - match 'log', :to => "dev_utilities#log" + match 'receive/users/:id', :to => 'publics#receive' + match 'hub', :to => 'publics#hub' + match 'log', :to => "dev_utilities#log" #root root :to => 'aspects#index'