无法翻译主机名" 0.0.0.0:3000"

时间:2015-03-11 23:11:30

标签: postgresql ruby-on-rails-4 osx-yosemite

我可以使用" rails s"来启动我的服务器。通过它,但是一旦我加载页面,我就会得到。

could not translate host name "0.0.0.0:3000"

我没有使用" - bind = 0.0.0.0"

以下是一些可能有用的文件。

Rails.application.routes.draw do
  get 'spotkeys/spot_page'
  root 'spotkeys#index'

  get 'index'         => 'spotkeys#index'
  get 'settings'      => 'spotkeys#settings'
  get 'key_settings'  => 'spotkeys#key_settings'
  get 'qr_codes/new'
  get 'qr_codes/create'
  get 'spotkey'       => 'spotkeys#spot_page'
  post 'spotkey'      => 'spotkeys#spot_page'
  get 'dashboard'     => 'spotkeys#dashboard'
  post 'dashboard'    => 'spotkeys#dashboard'
  get 'settings'      => 'spotkeys#settings'
  post 'settings'     => 'spotkeys#settings'
  get 'key_settings'  => 'spotkeys#key_settings'
  post 'key_settings' => 'spotkeys#key_settings'
  get 'signup'        => 'users/registrations#new', :as => :new_user_session
  post 'signin'       => 'users/sessions#create',  :as => :user_session
  delete 'signout'    => 'users/sessions#destroy'

  match '/dashboard'     => 'spotkeys#dashboard', via: [:get, :post] 
  match '/settings'      => 'spotkeys#settings', via: [:get, :post]  
  match '/sporkey'       => 'spotkeys#spotkey', via: [:get, :post]  
  match '/signin'        => 'users#signin', via: [:get, :post]   
  match '/signup'        => 'users#signup', via: [:get, :post] 
  match '/signout'       => 'spotkeys#signout', via: [:get, :post] 
  match '/key_settings'  => 'spotkeys#key_settings', via: [:get, :post] 

#  devise_scope :user do get
#  end

  resources :qr_codes, only: [:new, :create]
  resources :spotkeys
  resources :keys,
            :as => '',
            :path_names => { 
              :sign_in => "", 
              :sign_out => "signout", 
              :sign_up => "register" 
            }
  devise_for :users,

             :controllers => { :registrations => 'users/registrations',
                               :confirmations => 'users/confirmations',
                               :sessions => 'users/sessions',
                               :omniauth_callbacks => 'omniauth_callbacks'
                              },

              :to => 'users/sessions#destroy', :as => :destroy_user_session,

              :skip => [:sessions] do
  end
end

我正在使用postgresql但如果需要可以切换

我已检查porsgresql是否正在运行

launchctl load~ / Library / LaunchAgents / homebrew.mxcl.postgresql.plist

/usr/local/Cellar/postgresql/9.4.1/homebrew.mxcl.postgresql.plist:正在进行的操作

0 个答案:

没有答案