Coder Social home page Coder Social logo

Comments (4)

ThreeStar avatar ThreeStar commented on July 17, 2024

When I run the command "rails server",I have got many issues,they are:

=> Booting WEBrick
=> Rails 3.2.11 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:1208:in initialize': could not connect to server: Permission denied (PGError) Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"? from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:1208:innew'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:1208:in connect' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:326:ininitialize'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in new' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:28:inpostgresql_connection'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in new_connection' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:incheckout_new_connection'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in block (2 levels) in checkout' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:inloop'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in block in checkout' from /Users/Blues/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/monitor.rb:211:inmon_synchronize'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in checkout' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:inblock in connection'
from /Users/Blues/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/monitor.rb:211:in mon_synchronize' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:inconnection'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in retrieve_connection' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:inretrieve_connection'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in connection' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/model_schema.rb:308:inclear_cache!'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.11/lib/active_record/railtie.rb:97:in block (2 levels) in <class:Railtie>' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:418:in_run__751346259397607869__prepare__2696965486316187750__callbacks'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:405:in __run_callback' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:385:in_run_prepare_callbacks'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:81:in run_callbacks' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/reloader.rb:74:inprepare!'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/reloader.rb:48:in prepare!' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/application/finisher.rb:47:inblock in module:Finisher'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:30:in instance_exec' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:30:inrun'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:55:in block in run_initializers' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:54:ineach'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in run_initializers' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/application.rb:136:ininitialize!'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in method_missing' from /Users/Blues/Sites/mystory/config/environment.rb:8:in<top (required)>'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/backports-2.6.7/lib/backports/tools.rb:314:in require' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/backports-2.6.7/lib/backports/tools.rb:314:inrequire_with_backports'
from /Users/Blues/Sites/mystory/config.ru:3:in block in <main>' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.4/lib/rack/builder.rb:51:ininstance_eval'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.4/lib/rack/builder.rb:51:in initialize' from /Users/Blues/Sites/mystory/config.ru:innew'
from /Users/Blues/Sites/mystory/config.ru:in <main>' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.4/lib/rack/builder.rb:40:ineval'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.4/lib/rack/builder.rb:40:in parse_file' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.4/lib/rack/server.rb:200:inapp'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/commands/server.rb:46:in app' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.4/lib/rack/server.rb:304:inwrapped_app'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.4/lib/rack/server.rb:254:in start' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/commands/server.rb:70:instart'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/commands.rb:55:in block in <top (required)>' from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/commands.rb:50:intap'
from /Users/Blues/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/commands.rb:50:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `

'

It that the reason which I don't install PostgresSQL database?

Thanks,
Blues

from mystory.

lanejianzhang avatar lanejianzhang commented on July 17, 2024

Hello. I don't know exactly about what happened, you need install and run a database. And postgresql is good.
Search your questions in googlestable.com and site stackoverflow.com You can get the answer. Good luck!
Follow the guide of RoR is best way learn RoR.
And also you can use Sinatra. Because Sinatra is much easier than RoR for Web Developer. Sinatra is great!

from mystory.

ThreeStar avatar ThreeStar commented on July 17, 2024

Thanks guy~

I want to use your "mystory" to learn ror,and when I run the command "rails server",it give me the errors like above.I don't know how to fix it.

from mystory.

marshallshen avatar marshallshen commented on July 17, 2024

@ThreeStar
Your database isn't set up correctly, several things might take place:

  1. You didn't properly install Postgresql, if so, please look at this blog post
  2. You do not have permission to access your database table. If so, look at this stackoverflow post

Hope this helps.

from mystory.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.