Installation issues Redhat 6.5

47 views
Skip to first unread message

Sebastien Billard

unread,
May 28, 2014, 11:15:24 AM5/28/14
to allou...@googlegroups.com
Hi,

I'm trying to setup our own allourideas website.  I've gotten pretty far, after a lot of fighting, but i'm running into an issue with
airbrake and the database.

when I run script/generate airbrake --api-key <ourkey>
it complains that the development environment isn't configured.
Which was true.. so i switched to configuring it.

my database.yml looks like this:
# SQLite version 3.x
#   gem install sqlite3-ruby (not necessary on OS X Leopard)

production:
<<: *default
adapter: mysql2
database: allourideas_production
pool: 5
timeout: 5000
host: localhost
username: root
password: ****

development:
<<: *default
adapter: mysql2
datbase: rebirth_development
pool: 5
timeout: 5000
host: localhost
username: root
password: ****

test: &test
  <<: *default
adapter: mysql2
database: rebirth_test
pool: 5
timeout: 5000
host: localhost
username: root
password: ****

cucumber:
  <<: *test

But when I run RAILS_ENV=development .bin/rake db:create
I get this error:

DEPRECATION WARNING: Rake tasks in vendor/plugins/abingo/tasks, vendor/plugins/highcharts-rails/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, and vendor/plugins/limerick_rake/tasks are deprecated. Use lib/tasks instead. (called from <top (required)> at /var/www/allourideas.org/vendor/ruby/1.9.1/gems/rails-2.3.18/lib/tasks/rails.rb:10)
rake aborted!
undefined method `[]' for nil:NilClass
Tasks: TOP => db:create
(See full trace by running task with --trace)
~
~

Anythoughts or pointers?


Luke Baker

unread,
May 28, 2014, 11:24:27 AM5/28/14
to allou...@googlegroups.com
Can you run the rake command with --trace? That should yield some more
information about the error.

RAILS_ENV=development .bin/rake --trace db:create

Luke
> --
> You received this message because you are subscribed to the Google Groups
> "All Our Ideas" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to allourideas...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Sebastien Billard

unread,
May 28, 2014, 11:51:29 AM5/28/14
to allou...@googlegroups.com

[root@ip-172-31-17-4 allourideas.org]# RAILS_ENV=development bundle exec ./bin/rake --trace db:create
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
Your Gemfile lists the gem sendgrid (= 0.1.4) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
    at /var/www/allourideas.org/Rakefile:8:in `require'
DEPRECATION WARNING: Rake tasks in vendor/plugins/abingo/tasks, vendor/plugins/highcharts-rails/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, vendor/plugins/limerick_rake/tasks, and vendor/plugins/limerick_rake/tasks are deprecated. Use lib/tasks instead. (called from <top (required)> at /var/www/allourideas.org/vendor/ruby/1.9.1/gems/rails-2.3.18/lib/tasks/rails.rb:10)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:create
/usr/local/rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
./bin/rake:16:in `load'
./bin/rake:16:in `<main>'
Tasks: TOP => db:create

Luke Baker

unread,
May 28, 2014, 4:21:00 PM5/28/14
to allou...@googlegroups.com
I think your database.yml file may not be formatted correctly. It
appears these people have had similar problems with other Rails
projects:

http://stackoverflow.com/a/22082010
https://stackoverflow.com/questions/7623983/rake-undefined-method-for-nilnilclass#comment9256774_7624011

Luke

Sebastien Billard

unread,
May 29, 2014, 10:56:18 AM5/29/14
to allou...@googlegroups.com
Thanks,
That got me past that error.
Now on to a new one

when i do script/generate airbrake --api-key mykeyhere

/var/www/allourideas.org/vendor/ruby/1.9.1/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require': no such file to load -- rails/generators (MissingSourceFile)
        from script/generate:3:in `require'
        from script/generate:3:in `<main>'
 

Luke Baker

unread,
May 29, 2014, 11:19:56 AM5/29/14
to allou...@googlegroups.com
Try:

bundle exec ./script/generate airbrake --api-key mykeyhere

Luke

Sebastien Billard

unread,
May 29, 2014, 11:32:12 AM5/29/14
to allou...@googlegroups.com
Still died at the same spot
/var/www/allourideas.org/vendor/ruby/1.9.1/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require': no such file to load -- rails/generators (MissingSourceFile)


Luke Baker

unread,
May 29, 2014, 11:46:17 AM5/29/14
to allou...@googlegroups.com
If you run:

bundle exec ./script/generate

Do you see airbrake listed in the installed generators? A portion of
the output should look something like:

Installed Generators
Plugins (vendor/plugins): abingo_migration, controller, feature,
functional_test, helper, highchart, model, support, v
iew
Rubygems: airbrake, clearance, clearance_features, clearance_views,
cucumber, email_spec, feature, form, formtastic, friendly_id,
friendly_id_20_upgrade, integration_spec, paperclip, pickle, rspec,
rspec_controller, rspec_model, rspec_scaffold
Builtin: controller, helper, integration_test, mailer, metal,
migration, model, observer, performance_test, plugin, resource,
scaffold, session_migration

Sebastien Billard

unread,
May 29, 2014, 12:02:44 PM5/29/14
to allou...@googlegroups.com
I do see it

Luke Baker

unread,
May 29, 2014, 12:23:12 PM5/29/14
to allou...@googlegroups.com
Hmm, yeah I'm not sure why it isn't working.

Airbrake isn't essential to the working of All Our Ideas, so it should
run without that step.

Luke

Sebastien Billard

unread,
May 29, 2014, 12:41:20 PM5/29/14
to allou...@googlegroups.com
So I manually entered the airbrake id into airbrake.rb
and now i get this error when I try to access the site. (it's the error I was getting before)


** [Airbrake] Failure: Net::HTTPUnauthorized
Rendering template within layouts/application
Rendering errors/500.html.haml (500)
** [Airbrake] Failure: Net::HTTPUnauthorized
/!\ FAILSAFE /!\  2014-05-29 12:34:18 -0400
  Status: 500 Internal Server Error

How can I just tell the app to skip airbrake?

Sebastien Billard

unread,
May 29, 2014, 12:51:55 PM5/29/14
to allou...@googlegroups.com
I got it to work.
I had forgotten to do a RAILS_ENV=production bundle exec rake db:migrate
after I did the RAILS_ENV=production bundle exec rake db:sessions:create

thanks for the help.
 

Sebastien Billard

unread,
May 29, 2014, 12:57:27 PM5/29/14
to allou...@googlegroups.com
Well, the website comes up.  But the questionaire fails:

Processing QuestionsController#create (for 72.16.210.134 at 2014-05-29 12:53:14) [POST]
  Parameters: {"authenticity_token"=>"GSFmlum0SK/+XWTOHoBr023TnpWQMU2aE1fNKhOD2y4=", "question"=>{"name"=>"What would
you do for a klondike bar", "url"=>"klondike", "ideas"=>"Dance like a cartoon\r\nJump like a frog\r\n", "email"=>"em...@example.org", "password"=>"XXX", "information"=>""}, "default_text"=>"For example, \"Which do you want
more from the student government?\"", "default_text2"=>"studentgovernment", "default_text3"=>"Add your own ideas here.
..\r\n\r\nFor example:\r\nMore hammocks on campus\r\nImprove student advising\r\nMore outdoor tables and benches\r\nVi
deo game tournaments\r\nStart late dinner at 8PM\r\nLower textbook prices\r\nBring back parking for sophomores"}

ActiveResource::ServerError (Failed with 500 Internal Server Error):
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/connection.rb:206:in `handle_response'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/connection.rb:173:in `request'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/connection.rb:156:in `post'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/base.rb:1084:in `create'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/base.rb:867:in `save'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/validations.rb:259:in `save_with_validation'
  app/controllers/questions_controller.rb:1097:in `question_params_valid'
  app/controllers/questions_controller.rb:1075:in `create'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/base.rb:1333:in `perform_action'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/filters.rb:617:in `call_filters'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/rescue.rb:160:in `perform_action_with_rescue'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/flash.rb:151:in `perform_action_with_flash'
  vendor/ruby/1.9.1/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:337:in `perform_action_with_newrelic_trace'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/base.rb:532:in `process'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/filters.rb:606:in `process_with_filters'
  vendor/ruby/1.9.1/gems/compass-rails-1.0.3/lib/compass-rails/railties/2_3.rb:9:in `process_with_compass'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/base.rb:391:in `process'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/base.rb:386:in `call'
 vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:130:in `block in build_middleware_stack'
  vendor/ruby/1.9.1/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/agent_hooks.rb:32:in `call'
  vendor/ruby/1.9.1/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/agent_hooks.rb:32:in `call'
  vendor/ruby/1.9.1/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/browser_monitoring.rb:27:in `call'
  vendor/ruby/1.9.1/gems/sass-3.2.1/lib/sass/plugin/rack.rb:54:in `call'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/string_coercion.rb:25:in `call'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/params_parser.rb:15:in `call'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/session/abstract_store.rb:177:in `call'
  vendor/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/query_cache.rb:29:in `block in call'
  vendor/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  vendor/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/query_cache.rb:9:in `cache'
  vendor/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/query_cache.rb:28:in `call'
  vendor/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  vendor/ruby/1.9.1/gems/airbrake-3.1.12/lib/airbrake/rack.rb:44:in `call'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/failsafe.rb:26:in `call'
  vendor/ruby/1.9.1/gems/airbrake-3.1.12/lib/airbrake/user_informer.rb:16:in `_call'
  vendor/ruby/1.9.1/gems/airbrake-3.1.12/lib/airbrake/user_informer.rb:12:in `call'
  <internal:prelude>:10:in `synchronize'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:106:in `call'
  /usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-4.0.42/lib/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
  /usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-4.0.42/lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
  /usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-4.0.42/lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
  /usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-4.0.42/lib/phusion_passenger/request_handler.rb:448:in `block (3 levels) in start_threads'


Luke Baker

unread,
May 29, 2014, 1:07:15 PM5/29/14
to allou...@googlegroups.com
That's an error from pairwise. Did you install and get pairwise
running properly? The logs in your pairwise installation should have
some more details about what the specific error was.

Luke

Sebastien Billard

unread,
May 29, 2014, 1:23:24 PM5/29/14
to allou...@googlegroups.com
Good news is i'm making progress :)
Bad news is, it seems to be really slow process.
I fixed the pairwise error, I had changed the DNS entries, and forgot to modify the config.yml
but now, when I try to do a survey I get this:

 
ActiveResource::TimeoutError (Timeout::Error):
ActiveResource::TimeoutError (Timeout::Error):
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/connection.rb:175:in `rescue in request'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/connection.rb:169:in `request'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/connection.rb:156:in `post'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/base.rb:1084:in `create'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/base.rb:867:in `save'
  vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/validations.rb:259:in `save_with_validation'
  app/controllers/questions_controller.rb:1097:in `question_params_valid'
  app/controllers/questions_controller.rb:1075:in `create'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/base.rb:1333:in `perform_action'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/filters.rb:617:in `call_filters'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_b
enchmark'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/rescue.rb:160:in `perform_action_with_rescue'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/flash.rb:151:in `perform_action_with_flash'
  vendor/ruby/1.9.1/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:337:
in `perform_action_with_newrelic_trace'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/base.rb:532:in `process'
 vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/filters.rb:606:in `process_with_filters'
  vendor/ruby/1.9.1/gems/compass-rails-1.0.3/lib/compass-rails/railties/2_3.rb:9:in `process_with_compass'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/base.rb:391:in `process'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/base.rb:386:in `call'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/routing/route_set.rb:438:in `call'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:87:in `dispatch'
  vendor/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:121:in `_call'

Luke Baker

unread,
May 29, 2014, 1:34:18 PM5/29/14
to allou...@googlegroups.com
This is the AOI call to the pairwise API that is timing out. Is there
any data in the pairwise logs that indicate how long it took to
successfully create the question?

Luke

Sebastien Billard

unread,
May 29, 2014, 2:27:38 PM5/29/14
to allou...@googlegroups.com
I got it working.  And yes, the first call after an apache reset takes forever.  That seems to have been the problem.
Thank you very much for the help.

Sebastien Billard

unread,
Aug 21, 2014, 10:50:31 AM8/21/14
to allou...@googlegroups.com
Have you ever run into an issue where the app won't send reports?
I look in both the production logs for pairwise and allourideas and the requests are clearly there.  but the emails never go out, and i can't find a .csv file anywhere on the server.
Reply all
Reply to author
Forward
0 new messages