I am trying to run the ruby-bench-web frontend locally on my host machine but I’m getting some errors:
bundle install
rails server
Error:
=> Booting Puma
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
Puma 2.9.2 starting…
Min threads: 0, max threads: 16
Environment: development
Listening on tcp://localhost:3000
Started GET “/” for 127.0.0.1 at 2015-02-03 18:02:14 -0500
PG::ConnectionBad - could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/tmp/.s.PGSQL.5432”?
I aslo tried to modify config/database.yml and uncommented this line. But doesn’t seem to work either.
host: localhost
The error is slightly different now:
PG::ConnectionBad - could not connect to server: Connection refused
Is the server running on host “localhost” and accepting
TCP/IP connections on port 5432?
Any other ideas? I am running this on RHEL 6.5 btw.
It seems that the postgres server was not start by default after I install it. I workaround the issue by restarting the server and creating a db called “ruby-bench-web_development” with the “createdb” command.
However, I am getting these errors now when I start up rails server:
Started GET “/” for 127.0.0.1 at 2015-02-04 13:16:24 -0500
ActiveRecord::SchemaMigration Load (0.4ms) SELECT “schema_migrations”.* FROM “schema_migrations”
ActiveRecord::PendingMigrationError -
Migrations are pending. To resolve this issue, run:
bin/rake db:migrate RAILS_ENV=development
So then I ran rake and getting these errors:
[ruby-bench-web]$ rake db:migrate RAILS_ENV=development
== 20141123145429 SetupHstore: migrating ======================================
– enable_extension(“hstore”)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::SyntaxError: ERROR: syntax error at or near “EXTENSION”
LINE 1: CREATE EXTENSION IF NOT EXISTS “hstore”
^
: CREATE EXTENSION IF NOT EXISTS “hstore”/home/user/Downloads/ruby-bench-web/db/migrate/20141123145429_setup_hstore.rb:3:in up' ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: syntax error at or near "EXTENSION" LINE 1: CREATE EXTENSION IF NOT EXISTS "hstore" ^ : CREATE EXTENSION IF NOT EXISTS "hstore" /home/user/Downloads/ruby-bench-web/db/migrate/20141123145429_setup_hstore.rb:3:in up’
PG::SyntaxError: ERROR: syntax error at or near “EXTENSION”
LINE 1: CREATE EXTENSION IF NOT EXISTS “hstore”
^
/home/user/Downloads/ruby-bench-web/db/migrate/20141123145429_setup_hstore.rb:3:in `up’
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
I am using Postgres version 8.4.20. Is that the version that’s compatible with this project?
However, when I run rails server. I am getting more errors
Started GET “/” for 127.0.0.1 at 2015-02-04 16:32:03 -0500
Processing by ReposController#show_releases as HTML
Parameters: {“organization_name”=>“ruby”, “repo_name”=>“ruby”}
Organization Load (0.4ms) SELECT “organizations”.* FROM “organizations” WHERE “organizations”.“name” = $1 LIMIT 1 [[“name”, “ruby”]]
Completed 404 Not Found in 2ms