Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How I use to learn ROR in native? #3

Open
ThreeStar opened this issue May 3, 2013 · 4 comments
Open

How I use to learn ROR in native? #3

ThreeStar opened this issue May 3, 2013 · 4 comments

Comments

@ThreeStar
Copy link

Hi guy,

I am really a fresh man for ROR,and I also have not develop web application,because I can not found anyone that is good enough for me.But I have read many resource about ROR,I decide to try.

I have read the start guide from http://guides.rubyonrails.org,so I have made a very simple demo for blog.but I also don't know how to write a better project by myself.I need a unabridged project to learn it.But I don't want to publish it to Host,only in my computer.

How could I use it to learn ROR in native?

Any idea will be appreciate.Thanks in advance!

Blues

@ThreeStar
Copy link
Author

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

@lanejianzhang
Copy link
Collaborator

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!

@ThreeStar
Copy link
Author

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.

@marshallshen
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants