Ruby Bench Web FE



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


=> 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 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”?

How do I go about solving this DB issue?



Do you have postgres installed? we really need a getting started readme here :slight_smile:


Hi Sam,

I believe I do, unless it’s not the right one.

sudo yum list postgres*

Installed Packages
postgresql.x86_64 8.4.20-1.el6_5 @RHEL-65-x86_64
postgresql-devel.x86_64 8.4.20-1.el6_5 @RHEL-65-x86_64
postgresql-server.x86_64 8.4.20-1.el6_5 @RHEL-65-x86_64
postgresql-libs.x86_64 8.4.20-1.el6_5 @RHEL-65-x86_64

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.



its probably using ubuntu defaults and not finding the socket file, try specifying host and port in the database.yml file.


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 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"
: 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:inup’
PG::SyntaxError: ERROR: syntax error at or near "EXTENSION"
/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?



Upgrading Postgres to version 9.4 and running the following commands seems to resolve the previous issue.

rake db:drop RAILS_ENV=development
rake db:create RAILS_ENV=development
rake db:schema:load RAILS_ENV=development
rake db:migrate RAILS_ENV=development

However, when I run rails server. I am getting more errors :frowning:

Started GET “/” for 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

ActionController::RoutingError - Not found:
app/controllers/application_controller.rb:7:in not_found' app/controllers/repos_controller.rb:98:infind_organization_by_name’
app/controllers/repos_controller.rb:46:in show_releases' actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:insend_action’
actionpack (4.2.0) lib/abstract_controller/base.rb:198:in `process_action’

Any ideas? Thanks


Hi @jack, sorry for all your confusion. I should really get a setting up guide done soon.

Anyway you have to seed the database. just run bundle exec rake db:seed


Hi Alan, thanks for the help. I am finally able to get the frontend up and running on my hostmachine locally :smile: