CitizensFoundation / open-active-democracy

Open Active Democracy is now called Your Priorities. https://github.com/rbjarnason/your-priorities It's the same codebase but has been cleaned up and a new simpler UI added.
https://yrpri.org/
54 stars 19 forks source link

railtie_name is deprecated and has no effect #1

Closed medosheta closed 12 years ago

medosheta commented 13 years ago

hello , i'm trying to setup this awesome script on my server .. i did what's written here in the readme file but stacked at

rake db:create

it keeps giving me this error : ( DEPRECATION WARNING: railtie_name is deprecated and has no effect. (called from class:Engine at /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/twitter-auth-1b3f4e753cb7/lib/twitter_auth/engine.rb:5) WARNING: Global access to Rake DSL methods is deprecated. Please include ... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method OpenActiveDemocracy::Application#task called at /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/application.rb:215:in initialize_tasks' rake aborted! syntax error on line 29, col 2: host: localhost'

Tasks: TOP => db:create => db:load_config (See full trace by running task with --trace) ).

i'm new to rails and i strongly need to use this awesome open active democracy.

thanks,

rbjarnason commented 13 years ago

You seem to have a badly formatted database.yml file in your config folder.

I just added an example config file to https://github.com/rbjarnason/open-active-democracy/blob/master/config/database.yml.dist

medosheta commented 13 years ago

thank you v much rbjarnason for your concern.. I did what you said and everything went fine with that issue.

i completed the :

rake db:create

rake db:schema:load

rake db:seed

steps with no errors as i see.

but when i go to :

rails s

it gives me this : => Booting Mongrel => Rails 3.0.7 application starting in production on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server

Sphinx cannot be found on your system. You may need to configure the following settings in your config/sphinx.yml file:

For more information, read the documentation: http://freelancing-god.github.com/ts/en/advanced_config.html

/var/www/clients/client1/web1/web/config/initializers/openid_patch.rb:3: warning: already initialized constant REMOVED_RE Exiting /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/memoizable.rb:68:in block in memoize': Already memoized most_recent_activity (RuntimeError) from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/memoizable.rb:64:inclass_eval' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/memoizable.rb:64:in block in memoize' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/memoizable.rb:60:ineach' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/memoizable.rb:60:in memoize' from /var/www/clients/client1/web1/web/app/models/user.rb:405:inclass:User' from /var/www/clients/client1/web1/web/app/models/user.rb:2:in <top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:inrequire' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in block in require' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:227:inload_dependency' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in require' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:346:inrequire_or_load' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:300:in depend_on' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:216:inrequire_dependency' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/engine.rb:138:in block (2 levels) in eager_load!' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/engine.rb:137:ineach' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/engine.rb:137:in block in eager_load!' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/engine.rb:135:ineach' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/engine.rb:135:in eager_load!' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:108:ineager_load!' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application/finisher.rb:41:in block in <module:Finisher>' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:25:ininstance_exec' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:25:in run' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:50:inblock in run_initializers' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:49:in each' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:49:inrun_initializers' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:134:in initialize!' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:77:inmethod_missing' from /var/www/clients/client1/web1/web/config/environment.rb:5:in <top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:inrequire' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in block in require' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:inblock in load_dependency' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in new_constants_in' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:inload_dependency' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in require' from /var/www/clients/client1/web1/web/config.ru:3:inblock in

' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:in instance_eval' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:46:ininitialize' from /var/www/clients/client1/web1/web/config.ru:1:in new' from /var/www/clients/client1/web1/web/config.ru:1:in
' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:35:in eval' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.3/lib/rack/builder.rb:35:inparse_file' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.3/lib/rack/server.rb:162:in app' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.3/lib/rack/server.rb:253:inwrapped_app' from /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.3/lib/rack/server.rb:204:in start' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/commands/server.rb:65:instart' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:30:in block in <top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:27:intap' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:27:in <top (required)>' from script/rails:6:inrequire' from script/rails:6:in `
'

i googled the sphinx error and i managed to install sphinx but the error keeps coming up !

i hope i can find help with that.

rbjarnason commented 13 years ago

I've not seen this Already memoized problem before.

Do you have memcached installed? If not install it, you could try to restart the memcached server. Not sure if that will change anything but worth the try.

Otherwise, what sort of operating system are you running this on?

medosheta commented 13 years ago

i'm running it on Ubuntu 10.04 LTS and 'Ruby on Rails, PHP, Apache, Passenger, MySQL, PHP

i managed to complete the steps on the readme file with your help.

my site is partially active on http://egyptonnet.com

i don't know how to make it alive .. i'm totally new to rails

the last step i did is : #rails s

how can i make it work after all !

thanks for your support.

rbjarnason commented 13 years ago

I think you are almost there :) I went to http://egyptonnet.com:3000/ and got this error:

"No configuration provided for Facebooker2. Either set the app_id and secret or call Facebooker2.load_facebooker_yaml in an initializer"

You need to add a Facebooker config file, I have added an example here: https://github.com/rbjarnason/open-active-democracy/blob/master/config/facebooker.yml.dist

I think its enough for you just to add the facebooker.yml to get it running but the Facebook Like buttons wont work until you setup a Facebook Application and get an App Id and App Key and Secret.

You are in Egypt? Have you looked at http://egypt.yrpri.org/ and http://www.yrpri.org/ ? If you are in Egypt then we are looking for translators to help us to translate into Egyptian Arabic, if you know somebody :)

Also, before you can really go live with a version of open active democracy you need to skin it and customize it for your brand otherwise it will come up as Your Priorities which is our global non-profit brand.

medosheta commented 13 years ago

i did what you said and put the facebooker.yml in the config folder with api and secrets from facebook , but still getting the same issue !

yup i'm egyptian and was looking for some thig that help with our revolution and make the people share in making decisions and i found your app the best so far.

it will be pleasure to help and share translating the app and managing the styles for arabic lang, as i'll do that for my own app as soon as it works !

and for those sites they look wonderful and very useful , i hope i can run my own site soon.

medosheta commented 13 years ago

it's ok now .. i'm installing it .. but the captcha is not appearing !!

rbjarnason commented 13 years ago

Great, we should speak more about how we can help each other. We have been running this software for two years now to help with our own political revolution, while not as impressive as yours it has been used quite a bit by the public. Here is a link to a demo site with a lot of priorities: http://ny.og.betrireykjavik.is/ When the revolutions in Tunisia and Egypt happened we got so inspired that we started the Your Priorities project and setup those free websites, that will be officially launched out of Beta test in about a months time. We are an Icelandic non-profit organization so we have no aim to make any money from this :)

I checked back on the :3000 port on your websitre and the problem is still with the facebooker.yml config file. Two things:

  1. Is the file definetly called config/facebooker.yml ?
  2. Did you restart the rails server after you added the information into the config file?
rbjarnason commented 13 years ago

Congrats, I can see you have the website up and running :) Before you start to translate it, please contact me as I need to get you the latest translation database.

As you are now running it on port 3000, this is only a single user version, you need to get it running on port 80 under Apache/Passenger before you can open it to the public.

medosheta commented 13 years ago

thank you very much.. I really can't express how grateful i'm for your kind help.

for sure i'm going to start translation from this moment and i'll be happy to share my little effort with you.

thanks again

rbjarnason commented 13 years ago

Ok, I have uploaded the most up to date language database to: https://github.com/rbjarnason/open-active-democracy/blob/master/db/tr8n/tr8n.sql.gz

I highly recommend using this latest version as this will safe you from problems down the road.

Two ways to update it in your side.

A.

  1. You can download it directly from here: https://github.com/rbjarnason/open-active-democracy/blob/master/db/tr8n/tr8n.sql.gz
  2. Then you can put it into this folder db/tr8n/tr8n.sql.gz
  3. Run this command: rake tr8n:import_db

B. And this is probably the better approach as you will get all the latest code changes from me as well. Not sure when you last update the code from me but we have been working very hard (3 people team) the past two months on making it better.

  1. You edit this file in the root of your fork of open-active-democracy: .git/config
  2. You add this to the git config file. [remote "robert"] url = git://github.com/rbjarnason/open-active-democracy.git fetch = +refs/heads/:refs/remotes/robert/
  3. You run this commands to fetch and merge my changes into your fork of the code git fetch robert git merge robert/master
  4. You run this command in the root of your web application to get the new and updated language database: rake tr8n:import_db
medosheta commented 13 years ago

ok i'll try the second method first, otherwise i'll pass through the first one. and thanks for the detailed description.

Date: Wed, 22 Jun 2011 16:02:03 -0700 From: reply@reply.github.com To: dr_sheta@msn.com Subject: Re: [open-active-democracy] railtie_name is deprecated and has no effect (#1)

Ok, I have uploaded the most up to date language database to: https://github.com/rbjarnason/open-active-democracy/blob/master/db/tr8n/tr8n.sql.gz

I highly recommend using this latest version as this will safe you from problems down the road.

Two ways to update it in your side.

A.

  1. You can download it directly from here: https://github.com/rbjarnason/open-active-democracy/blob/master/db/tr8n/tr8n.sql.gz
  2. Then you can put it into this folder db/tr8n/tr8n.sql.gz
  3. Run this command: rake tr8n:import_db

B. And this is probably the better approach as you will get all the latest code changes from me as well. Not sure when you last update the code from me but we have been working very hard (3 people team) the past two months on making it better.

  1. You edit this file in the root of your fork of open-active-democracy: .git/config
  2. You add this to the git config file. [remote "robert"] url = git://github.com/rbjarnason/open-active-democracy.git fetch = +refs/heads/:refs/remotes/robert/
  3. You run this commands to fetch and merge my changes into your fork of the code git fetch robert git merge robert/master
  4. You run this command in the root of your web application to get the new and updated language database: rake tr8n:import_db

Reply to this email directly or view it on GitHub: https://github.com/rbjarnason/open-active-democracy/issues/1#issuecomment-1421830

rbjarnason commented 13 years ago

If you succeed in the second method you might have to run this command as well to upgrade the main database. rake db:migrate

But maybe nothing will happen when you run this command as it looks like your code is no more than 2 days old as you forked the codebase from Rifa who is doing HTML/CSS coding out of Indonesia.

I highly recommend option 2 as we are still fixing bugs every day, so you can keep up to date with those two simple commands. git fetch robert git merge robert/master