Issues getting started.

79 views
Skip to first unread message

N Bhargav

unread,
Feb 12, 2014, 11:07:41 PM2/12/14
to allou...@googlegroups.com
Hi,

I'm having a tough time getting aoi to work. I followed the exact instructions on CentOS and Ubuntu but still no luck. The problem is when I try to create questions I see this error.

ActiveResource::ServerError in QuestionsController#create

Failed with 500 Internal Server Error

RAILS_ROOT: /home/bhargav/allourideas.org
Application Trace | Framework Trace | Full Trace

/home/bhargav/allourideas.org/vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/connection.rb:206:in `handle_response'
/home/bhargav/allourideas.org/vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/connection.rb:173:in `request'
/home/bhargav/allourideas.org/vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/connection.rb:156:in `post'
/home/bhargav/allourideas.org/vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/base.rb:1084:in `create'
/home/bhargav/allourideas.org/vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/base.rb:867:in `save'
/home/bhargav/allourideas.org/vendor/ruby/1.9.1/gems/activeresource-2.3.18/lib/active_resource/validations.rb:259:in `save_with_validation'
/home/bhargav/allourideas.org/app/controllers/questions_controller.rb:1097:in `question_params_valid'
/home/bhargav/allourideas.org/app/controllers/questions_controller.rb:1075:in `create'

And some other URLs too giving me similar errors. What I had initially suspected was that config/config.yml doesn't have proper configuration but I see no problem with it either. My config is,

global: &global
    INFO_ALLOURIDEAS_EMAIL: in...@example.org
    INFO_PHOTOCRACY_EMAIL: in...@example.com
    SIGNUPS_ALLOURIDEAS_EMAIL: sig...@example.org
    SIGNUPS_PHOTOCRACY_EMAIL: sig...@example.com
    ERRORS_EMAIL: err...@example.org

development:
    <<: *global
    HOST: http://localhost:3001 # domain:port of AOI server
    API_HOST: http://localhost:3000 # URL for pairwise API server
    PAIRWISE_USERNAME: bhar...@gmail.com
    PAIRWISE_PASSWORD: password
    PHOTOCRACY_USERNAME: bhar...@gmail.com
    PHOTOCRACY_PASSWORD:
password
    PHOTOCRACY_HOST: photocracy:3001 # domain:port of Photocracy (AOI) Server
    IP_ADDR_HASH_SALT: 2039d9ds9ufsdioh2394230 #prevent dictionary attacks on stored ip address hashes

production:
    <<: *global
    HOST: <%= ENV['ALLOURIDEAS_HOST'] %>
    API_HOST: <%= ENV['API_HOST'] %>
    PAIRWISE_USERNAME: <%= ENV['PAIRWISE_USERNAME'] %>
    PAIRWISE_PASSWORD: <%= ENV['PAIRWISE_PASSWORD'] %>
    IP_ADDR_HASH_SALT: <%= ENV['IP_ADDR_HASH_SALT'] %> #prevent dictionary attacks on stored ip address hashes

    PHOTOCRACY_USERNAME: <%= ENV['PHOTOCRACY_USERNAME'] %>
    PHOTOCRACY_PASSWORD: <%= ENV['PHOTOCRACY_PASSWORD'] %>
    PHOTOCRACY_HOST: photocracy.org

    INFO_ALLOURIDEAS_EMAIL: <%= ENV['INFO_ALLOURIDEAS_EMAIL'] %>
    INFO_PHOTOCRACY_EMAIL: <%= ENV['INFO_PHOTOCRACY_EMAIL'] %>
    SIGNUPS_ALLOURIDEAS_EMAIL: <%= ENV['SIGNUPS_ALLOURIDEAS_EMAIL'] %>
    SIGNUPS_PHOTOCRACY_EMAIL: <%= ENV['SIGNUPS_PHOTOCRACY_EMAIL'] %>
    ERRORS_EMAIL: <%= ENV['ERRORS_EMAIL'] %>

staging:
    <<: *global
    HOST: <%= ENV['STAGING_ALLOURIDEAS_HOST'] %>
    API_HOST: <%= ENV['STAGING_API_HOST'] %>
    PAIRWISE_USERNAME: <%= ENV['PAIRWISE_USERNAME'] %>
    PAIRWISE_PASSWORD: <%= ENV['PAIRWISE_PASSWORD'] %>

    PHOTOCRACY_USERNAME: <%= ENV['PHOTOCRACY_USERNAME'] %>
    PHOTOCRACY_PASSWORD: <%= ENV['PHOTOCRACY_PASSWORD'] %>
    PHOTOCRACY_HOST: photocracy.org

    IP_ADDR_HASH_SALT: <%= ENV['IP_ADDR_HASH_SALT'] %> #prevent dictionary attacks on stored ip address hashes

test:
    <<: *global
    HOST: localhost
    API_HOST: http://localhost:4000

    PAIRWISE_USERNAME:
    PAIRWISE_PASSWORD:

cucumber:
    <<: *global
    HOST: localhost
    # Use a different test database / server for test purposes
    API_HOST: http://localhost:4000
    PAIRWISE_USERNAME: tes...@dkapadia.com
    PAIRWISE_PASSWORD: wheatthins
    PHOTOCRACY_USERNAME: photocr...@dkapadia.com
    PHOTOCRACY_PASSWORD: saltines
    IP_ADDR_HASH_SALT: 2039d9ds9ufsdioh2394230 #prevent dictionary attacks on stored ip address hashes
    PHOTOCRACY_HOST: photocracy.org

Also I want to know when each time do I have to restart WEBrick when I change config/config.yml?

Any ideas that can make move in right direction is appreciated.

Thanks,

N Bhargav.

Luke Baker

unread,
Feb 13, 2014, 3:57:55 PM2/13/14
to allou...@googlegroups.com
It looks like this error might be due to an error on the pairwise
server. Do you see any error logs on the pairwise server after this
error occurs on the All Our Ideas server?

Yeah, you might need to restart WEBrick after making changes to
config/config.yml.

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/groups/opt_out.

N Bhargav

unread,
Feb 13, 2014, 10:39:42 PM2/13/14
to allou...@googlegroups.com
Hi Luke,

Thanks for helping me out. Here is the current logs/development.log which I posted it on gist as it is 1MB+

https://gist.github.com/bhargav3/8995313

Let me know if you will need any more info to diagnose the root cause of this problem.

Thanks,

N Bhargav.

Luke Baker

unread,
Feb 14, 2014, 8:20:30 AM2/14/14
to allou...@googlegroups.com
That looks like just the log for the allourideas.org code. And it
seems to be having trouble connecting to the pairwise-api. Did you
install, configure, and run the pairwise-api code as well? The two
applications need to be running at the same time, as pairwise-api is
the key API server that the allourideas.org code uses.

Luke

N Bhargav

unread,
Feb 14, 2014, 5:00:02 PM2/14/14
to allou...@googlegroups.com
Here is the pairwise-api log from logs/development.log,

https://gist.github.com/bhargav3/9010138

Also I have made sure pairwise-api is started before I start aoi. So what do you think is causing these issues?


Thanks,

N Bhargav.

On Thursday, February 13, 2014 9:37:41 AM UTC+5:30, N Bhargav wrote:

Luke Baker

unread,
Feb 14, 2014, 5:52:12 PM2/14/14
to allou...@googlegroups.com
Ah, it looks like pairwise is having trouble connecting to Redis. Do
you have that running as well?

Luke

N Bhargav

unread,
Feb 14, 2014, 10:55:42 PM2/14/14
to allou...@googlegroups.com

Thanks a lot, because of a firewall issue pairwise-api was not able to connect to redis-server. And when I try to see the list of questions on http://domain.com/questions, I see a template missing error.

Template is missing
Missing template questions/index.erb in view path /opt/allourideas/app/views:/opt/allourideas/vendor/ruby/1.9.1/gems/thoughtbot-clearance-0.8.2/app/views:/opt/allourideas/vendor/plugins/flutie/app/views


Any ideas?



On Thursday, February 13, 2014 9:37:41 AM UTC+5:30, N Bhargav wrote:

Marco DeLuca

unread,
Feb 15, 2014, 8:03:12 AM2/15/14
to allou...@googlegroups.com
Luke - thanks it looks like we have everything working. Correct me if Im wrong, but I dont think there is a feature for "listing ideas". The DISCOVER option on your site (The best ideas will bubble to the top using our system that is open, transparent, and powerful) is just a hardcoded link to a PlanNYC example, right?

Part of what we need to do is allow people to browse through issues related to our community. Now, we're fine to make those mods ourselves, i just wanted to make sure I wasnt missing something about how AOI works natively. Anyway, I really do appreciate you taking the time to help us get this up and running. 

Luke Baker

unread,
Feb 17, 2014, 7:39:45 AM2/17/14
to allou...@googlegroups.com
Marco, you're correct AOI doesn't have that feature baked-in. You'll
need to add that yourself.

Luke

Luke Baker

unread,
Feb 17, 2014, 7:38:53 AM2/17/14
to allou...@googlegroups.com
The All Our Ideas code doesn't have the template dedicated to showing
the list of available questions. You can see where Ruby on Rails is
looking for that template file, though. I think it ought be to pretty
easy to add one, by creating the template file in
app/views/questions/index.html.erb and having that template iterate
over @questions variable that was set in the index method of the
QuestionsController.

Luke
Reply all
Reply to author
Forward
0 new messages