Closed Anyoks closed 9 years ago
Hey there. Please add a dummy entry for "texas_am_api_key" in your api_keys.yml file. I've added an entry to the example file so you can copy from there too. Let us know if you encounter any other issues.
Thank you so Much. that worked. I just ran the Server which started up okay. But the page at local host 3000 says; Secret should be something secure, like "a1c959a3289296b41fa432f41052fefe". The value you provided, "xxx", is shorter than the minimum length of 30 characters
and the command line error is:
transport' ** [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/bundler/gems/raven-ruby-d62c61ca836c/lib/raven/client.rb:36:in
send'
\ [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/bundler/gems/raven-ruby-d62c61ca836c/lib/raven/base.rb:71:in send' ** [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/bundler/gems/raven-ruby-d62c61ca836c/lib/raven/base.rb:109:in
block in capture_exception'
\ [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/bundler/gems/raven-ruby-d62c61ca836c/lib/raven/base.rb:136:in send_or_skip' ** [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/bundler/gems/raven-ruby-d62c61ca836c/lib/raven/base.rb:103:in
capture_exception'
\ [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/bundler/gems/raven-ruby-d62c61ca836c/lib/raven/integrations/rack.rb:29:in capture_exception' ** [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/bundler/gems/raven-ruby-d62c61ca836c/lib/raven/integrations/rails/middleware/debug_exceptions_catcher.rb:10:in
render_exception_with_raven'
\ [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/actionpack-3.0.20/lib/action_dispatch/middleware/show_exceptions.rb:59:in call' ** [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/rack/logger.rb:13:in
call'
\ [Raven] /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/rack-contrib-1.1.0/lib/rack/contrib/runtime.rb:18:in `call'ArgumentError (Secret should be something secure, like "a1c959a3289296b41fa432f41052fefe". The value you provided, "xxx", is shorter than the minimum length of 30 characters): lib/strip_empty_sessions.rb:27:in `call'
Rendered /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/actionpack-3.0.20/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.1ms) Rendered /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/actionpack-3.0.20/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (5.3ms) Rendered /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/actionpack-3.0.20/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (9.8ms)
So I'm thinking that maybe (Thought I still don't know) the values with xx in the api_keys.yml file should be replaced right? But is there a criteria for replacement? will arbitrary characters suffice? And if I place arbitrary values, will they haunt me much later?
Thank you for your time.
after changing the 'xxx' in my api_keys.yml nothing happens. Could you please help me out?
you need to pick a secret of sufficient length , at least 30 in this case .
that should do you for.
--timball
please pardom the two thumbed typist On Feb 25, 2015 6:37 AM, "Anyoks" notifications@github.com wrote:
after changing the 'xxx' in my api_keys.yml nothing happens. Could you please help me out?
— Reply to this email directly or view it on GitHub https://github.com/sunlightlabs/opencongress/issues/505#issuecomment-75946267 .
Due to the large size and scope of the project, it's difficult to provide a complete and working deployment out of the box. We utilize a number of services throughout the app that require an API key from the respective provider. Some functionality won't work without a specific key (such as the texas_am_api_key for geolocation). We obviously can't provide these keys to the public because they're registered for use at our organization. That being said, you can obtain your own keys or alter the code in your own fork to utilize a different service (or cut out the functionality altogether) as long as you comply with the GPLv3 license. Hopefully this clarifies the situation.
Thank you so Much! That really shed light on the issue. I totally understand what you mean. That being said, I'd like to know where I can obtain such a key and how to add it, because adding it to the api_key.yml file doesn't make a difference in the running of the app. Is there a procedure to doing it? or where I can read up on how to change it or understand it more? there's not much information around. I hope I'm not asking too much. Thank you very much.
https://github.com/sunlightlabs/opencongress/blob/master/config/api_keys.yml.example
in your checkout of the code , you must rename the api_keys.yml.example file to api_keys.yml
$ cd config/
$ mv api_keys.yml.example api_keys.yml
$ vi api_keys.yml
AND then EDIT the api_keys.yml file with all the needed api credentials from all the required services . each service is mentioned very clearly in the api_keys.yml file . we use over 22 services each w/ unique authorization credentials, some services like bluestate digital you may not want or need , you will have to fork and adjust the code to your specific needs .
--timball
Awesome, quick clarification thought, Should I do this before I do a bundle install, before migrating the database and all right?
i believe it would help , but is not strictly necessary .
Thank you very much. I'll get back to you tomorrow after a trial.
So I found what the issue was. the application needed a rails secret key, in the application_settings.yml. adding it fixed the issue. Thanks for your help.
Local installation of open congress worked well till I ran Rake db:init. I get a Raven warning then a rake halt with an error siting a problem with missing api_keys. Here is the full command line error output.
opencongress-master$ rake db:init
* [Raven] Unable to load raven/integrations/delayed_job: uninitialized constant Delayed::Plugin * [Raven] Event not sent due to excluded environment: default rake aborted! Missing setting 'texas_am_api_key' in /home/orinamokaya/Desktop/Linux/Rails/uwazi/opencongress-master/config/api_keys.yml /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/settingslogic-2.0.9/lib/settingslogic.rb:189:in
missing_key' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/settingslogic-2.0.9/lib/settingslogic.rb:117:in
method_missing' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/settingslogic-2.0.9/lib/settingslogic.rb:66:inmethod_missing' /home/orinamokaya/Desktop/Linux/Rails/uwazi/opencongress-master/config/initializers/geocoder.rb:17:in
<top (required)>' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:236:inload' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:236:in
block in load' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:inblock in load_dependency' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:597:in
new_constants_in' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:inload_dependency' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:236:in
load' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/engine.rb:201:inblock (2 levels) in <class:Engine>' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/engine.rb:200:in
each' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/engine.rb:200:inblock in <class:Engine>' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/initializable.rb:25:in
instance_exec' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/initializable.rb:25:inrun' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/initializable.rb:50:in
block in run_initializers' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/initializable.rb:49:ineach' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/initializable.rb:49:in
run_initializers' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/application.rb:134:ininitialize!' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/application.rb:77:in
method_missing' /home/orinamokaya/Desktop/Linux/Rails/uwazi/opencongress-master/config/environment.rb:5:in<top (required)>' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in
require' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:inblock in require' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in
block in load_dependency' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:597:innew_constants_in' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in
load_dependency' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:inrequire' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/application.rb:103:in
require_environment!' /home/orinamokaya/.rvm/gems/ruby-1.9.3-p484@oc/gems/railties-3.0.20/lib/rails/application.rb:218:in `block in initialize_tasks' Tasks: TOP => db:init => environment (See full trace by running task with --trace)opencongress-master$