Topic: Prepare the Kete Application
Topic type: Topic
Outlines the steps to prepare a kete application itself to run in the context of the installation guide.
Originally written by Walter McGinnis, Kete Project Lead for Katipo Communications, Ltd.
Part of the Installation Guide
Important Note: This step assumes that you are logged in as the user who will be running your Kete. For demos and development this is likely your normal account, for production this is the "kete" account if you have followed the conventions laid forth in the last step.
Prepare Kete
We have some more set up to do before the first time we run Kete. Most of the Kete specific gem installs are done in a command but there are a two other commands to run.
$ sudo su
# cd /home/kete/apps/your_app
# rake manage_gems:required:install
# gem install rmagick
There is an additional required step for Mac OS X Leopard (10.5.1). On 10.5 you probably noticed that the Zoom gem failed to installed above. We reinstall it by hand like so:
# env ARCHFLAGS="-arch i386" gem install zoom
Warning for users of Kete 1.2: Kete 1.2 is not compatible with the latest Nokogiri gem and causes issues with search results. You can fix this by downgrading to Nokogiri version 1.3.3, which is known to work. The following commands will help to do that.
# gem install nokogiri --version=1.3.3
# gem uninstall nokogiri (all versions except 1.3.3)
If you want metadata extracted from uploads, you will also need to run the following:
# sudo gem install mini_exiftool
You now need to load the default data into your new Kete before it is ready to run. You need to do this for each database you will be using. If you are just doing this for a demo or development, simply using the default Rails environment of "development" is sufficient. Do this:
$ rake kete:tools:set_locales
$ rake db:bootstrap
...
However, if you are setting up a production site, do this instead:
$ RAILS_ENV=production rake db:bootstrap
...
If you get an error like "No such file or directory - /tmp/mysql.sock", try replacing "localhost" with 127.0.0.1 in your config/database.yml file.
Next step:
Apache2 and Passenger
Discuss This Topic
There are 31 comments in this discussion.
Read and join this discussion
Hi PeterT,
Great to hear that you are pioneering a new platform for Kete. If you had any steps that differed from the Debian steps for installing required software, I would encourage you to create a topic for it, or at least post comments on the Debian topic.
One of the prerequisites for the kete unix user is that it have sudo privileges (usually ALL, but you could do a little research and limit it to a specific set of commands). Can you confirm that you have given that user sudo in /etc/sudoers? I assume that is where it would be on Centos.
Cheers,
Walter
Tags: Kete, Centos, Installation
petert
said CentOS install
Walter,
Thankyou for advice. It seems to have made things a little better in that I am now getting a different error message. As below
---------------------------------------------------------------------------------------------------------------------
[kete@commstest apps]$ rake prep_app
(in /home/kete/apps)
"this may take awhile and have a lot of output. you can ignore warnings."
"requires sudo or root privileges. you will be prompted for password if necessa
ry."
"piston"
error: while executing gem ... (gem::remotefetcher::fetcherror)
connection timed out - connect(2) (errno::etimedout)
getting size of http://gems.rubyforge.org/marshal.4.8
"capistrano"
error: while executing gem ... (gem::remotefetcher::fetcherror)
connection timed out - connect(2) (errno::etimedout)
getting size of http://gems.rubyforge.org/marshal.4.8
-------------------------------------------------------------------------------------------------------
And so on..
It looks as though there are bad or no proxy settings. Yet I have set HTTP_PROXY in both the root user and kete user. Wget works fine.
Is there something else I should be looking at?
regards
PeterT
Glad that helped.
Rubyforge can be flaky sometimes which maybe the cause of your connection time-outs. So, if I was you, I would do two things:
- try a "wget http://google.com/" or "lynx http://google.com/" to see if you can reach anything by http, if not it probably is your proxy settings
- if you can google, try a "wget http://gems.rubyforge.org/" or "lynx http://gems.rubyforge.org/" to see if you can reach gems.rubyforge.org via http, it maybe that their site is overloaded and slow to respond
- if all that works, try the command rake prep_app command one more time. If it dies with the same error, try it with rake prep_app --trace and post the results here.
Cheers,
Walter
Tags: Centos, Installation, Kete, rubyforge, gem
Ah, didn't read your last post fully. Looks like you can get out from the box via http as tested by wget (how else would you be able to install the other required software, of course).
If trying again doesn't produce better results, do the --trace step as mentioned and we'll go from there.
Cheers,
Walter
petert
said CentOS install
Walter,
I ran the rake process with trace. The result is below.
---------------------------------------------------------------------------------------------------------------------------
[kete@commstest apps]$ rake --trace prep_app
(in /home/kete/apps)
** invoke prep_app (first_time)
** execute prep_app
"this may take awhile and have a lot of output. you can ignore warnings."
** invoke manage_gems:management:install (first_time)
** execute manage_gems:management:install
** execute manage_gems:exec_action
"requires sudo or root privileges. you will be prompted for password if necessa
ry."
"piston"
error: while executing gem ... (gem::remotefetcher::fetcherror)
connection timed out - connect(2) (errno::etimedout)
getting size of http://gems.rubyforge.org/marshal.4.8
"capistrano"
error: while executing gem ... (gem::remotefetcher::fetcherror)
connection timed out - connect(2) (errno::etimedout)
getting size of http://gems.rubyforge.org/marshal.4.8
** invoke manage_gems:required:install (first_time)
** execute manage_gems:required:install
** execute manage_gems:exec_action
"requires sudo or root privileges. you will be prompted for password if necessa
ry."
"memcache-client"
error: interrupted
rake aborted!
/home/kete/apps/lib/tasks/manage_gems.rake:27:in ``'
/home/kete/apps/lib/tasks/manage_gems.rake:27
/home/kete/apps/lib/tasks/manage_gems.rake:25:in `each'
/home/kete/apps/lib/tasks/manage_gems.rake:25
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
/home/kete/apps/lib/tasks/manage_gems.rake:36
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_cal
l_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_cal
l_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
/home/kete/apps/lib/tasks/prep_app.rake:19
/home/kete/apps/lib/tasks/prep_app.rake:18:in `each'
/home/kete/apps/lib/tasks/prep_app.rake:18
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_cal
l_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_cal
l_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_excep
tion_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_excep
tion_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
----------------------------------------------------------------------------------------------------------------------------
I stopped it before it finished. I hope the information is sufficient.
I might also add that we tried a test where this server was configued to connect directly to the internet and ran the rake process ran successfully.
It would seem then that the problem is in the way gem handles the proxy settings or that the proxy server (MS proxy) is filtering out the gem requests.
regards
Peter
Sorry, I don't have experience with MS Proxy. I guess my suggestion would be to go with the direct internet until you finish the prep_app task, which it sounds like you may have done already, and then reinstate the proxying.
Or you could see if the 2.3 Authenticating Windows Proxy Problems answer from the rubygems FAQ does the trick. I found it in the Ruby Gems Manual.
Or the "Running gem install when you are behind a proxy." section of http://wiki.rubyonrails.org/rails/pages/GemRails might do the trick. Though it sounds like you may have done some of that already.
Good luck and keep us posted.
Cheers,
Walter
Tags: MS Proxy, Installation, proxy, rubygems
I have been following the instructions carefully up to this point, and they've been excellent. This is the first snag I've run into (but it sounds like an important one ;) )... I can't run the rake db:bootstrap RAILS_ENV=production command (or the default development one). I get the error:
Access denied for user 'kete'@'localhost' (using password: YES)
I am logged in as the user "kete" and that is the same username I granted sql permissions to for each of the three databases. I'm really not sure what to do from here... there doesn't appear to be anywhere in the rake command that would accept an option of the mysql password. I actually set the mysql password for user kete to the same as its account password.
Thoughts?
Here's the trace, too, just in case:
kete@debian:~/apps/kete-stable$ rake db:bootstrap rails_env=production --trace
(in /home/kete/apps/kete-stable)
** invoke db:bootstrap (first_time)
** invoke db:drop (first_time)
** invoke environment (first_time)
** execute environment
rake aborted!
access denied for user 'kete'@'localhost' (using password: yes)
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:471:in `real_connect'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:471:in `connect'/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:165:in `initialize'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `new'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `send'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `connection='
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/base.rb:1063:in `table_exists?'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/active_record/base.rb:1153:in `inspect'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/symbol.rb:11:in `to_s'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/symbol.rb:11:in `inspect'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/symbol.rb:11:in `__send__'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/symbol.rb:11:in `to_proc'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:426:in `collect'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:426:in `log_call'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:222:in `load_missing_constant'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:469:in `const_missing'
/home/kete/apps/kete-stable/vendor/plugins/acts_as_taggable_on_steroids/lib/tag.rb:8
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
/home/kete/apps/kete-stable/vendor/plugins/acts_as_taggable_on_steroids/init.rb:4:in `evaluate_init_rb'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/rails/plugin.rb:79:in `evaluate_init_rb'
/home/kete/apps/kete-stable/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/rails/plugin.rb:75:in `evaluate_init_rb'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/rails/plugin.rb:39:in `load'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:33:in `load_plugins'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `each'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `load_plugins'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/initializer.rb:189:in `load_plugins'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/initializer.rb:105:in `process'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/initializer.rb:49:in `send'
/home/kete/apps/kete-stable/config/../vendor/rails/railties/lib/initializer.rb:49:in `run'
/home/kete/apps/kete-stable/config/environment.rb:24
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/home/kete/apps/kete-stable/vendor/rails/railties/lib/tasks/misc.rake:3
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Hi Marc,
Thanks for the complement on the instructions. Now lets see if we can get things going for you.
The first thing I would do is try connecting to the database directly with the mysql client at the command line to verify that the settings in config/database.yml do indeed work. I would literally cut and paste the settings in (could be a small typo you are looking for), something like this:
$ mysql -u <the_username_from_database.yml> -p <the_database_name_from_database.yml>
Enter Password: <the_password_from_database.yml>
If you can connect successfully that way, let us know and we dig deeper.
If not, connect to your "mysql" database as root and then do the following:
$ mysql -u root -p mysql
Enter Password: <mysql_root_user_password>
mysql> select User, Host from user; # verify that you see your user with correct host in the results
mysql> select Db, User, Host from db; # verify that your db exists and there is a mapping to your user
If either your database or your user aren't in there, revisit the steps in this topic:
http://kete.net.nz/documentation/topics/show/120
If they are, but you were't able to login with the user and password combination, you probably have a typo in your password. Update the user's password like so:
mysql> Update user set password = password('<the_correct_password>') where User = <the_correct_username> and Host = 'localhost';Let us know how you get on!
Cheers,
Walter
Tags: mysql, Troubleshooting, Installation, Databases
Marc Bower
said Got it...
I'm not sure if my post is even there... I've seen it come and go... in any case, even though the grants looked fine, I just gave ALL permissions to my kete user and it was able to bootstrap OK.
Marc Bower
said Thanks :)
Thanks Walter... I had granted way more rights than necessary to get it going by the time I read your reply :)
However, I think, looking back at it, that I see what happened - when I typed in the names of the dbs that the kete user had privileges on, the ' marks were not real ' marks.... they were ` marks. That was probably causing the problem. But now that kete@localhost has full permissions on everything, it's working like a charm. On with the quality instructions I go. :)
Marc,
Great to hear you are back in the swing of things. You should be pretty close then. Enjoy your new Kete instance!
Cheers,
Walter
nlk
said Rake Aborted
Thanks for your help learning command lines.
Below is my trace any help appreciated.
GCPLKete:kete nancy$ rake db:bootstrap --trace
(in /Users/nancy/apps/kete)
** Invoke db:bootstrap (first_time)
** Invoke db:drop (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
/Users/nancy/apps/kete/config/environment.rb:133: syntax error, unexpected tLSHFT, expecting $end
<<<<<<< HEAD:config/environment.rb
^
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/Users/nancy/apps/kete/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in `require'
/Users/nancy/apps/kete/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in `new_constants_in'
/Users/nancy/apps/kete/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in `require'
/Users/nancy/apps/kete/vendor/rails/railties/lib/tasks/misc.rake:3
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain'
/opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain'
/opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/opt/local/bin/rake:19:in `load'
/opt/local/bin/rake:19
Hi nlk,
Glad you made it a bit further down the track. Almost there, really. Are you using any version control system (Git, Subversion, CVS) with your copy of Kete's code on top of the git clone of the Kete repository? It looks to me like you have code in that file from a "conflict".
When version control systems encounter two versions of a file that contradict each and can't be "merged" logically, they mark the file as conflicted and add "<<<<<" and "=====" and ">>>>>" demarcating the two versions' sections that they can't resolve to the file. That is what looks like it is going on here.
This could simply be the result of you doing a local edit and then doing a "git pull" to update your copy of Kete, since Git (our version control system) may have said the file is conflicted.
Could you email me the file in question (config/environment.rb) and I'll have a look. Walter -a t- katipo dot co . nz.
Tags: config/environtment.rb
Hi there,
I am installing the Kete on a open suse linux server. Everything so far is ok, but I get stuck with the load the default data.
I decide to use just the root account the my colleague gave me to keep it simple.
The details of the issue are:
rake db:bootstrap RAILS_ENV=test
(in /usr/webpages/kete2)
rake aborted!
no such file to load -- nokogiri
When I run with trace, the result are:
rake db:bootstrap --trace
(in /usr/webpages/kete2)
** Invoke db:bootstrap (first_time)
** Invoke db:drop (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
no such file to load -- nokogiri
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in 'gem_original_require'
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in 'require'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in 'require'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in 'new_constants_in'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in 'require'
/usr/webpages/kete2/vendor/plugins/acts_as_zoom/lib/record.rb:3
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in 'gem_original_require'
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in 'require'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in 'require'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in 'new_constants_in'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in 'require'
/usr/webpages/kete2/vendor/plugins/acts_as_zoom/lib/acts_as_zoom.rb:25
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in 'gem_original_require'
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in 'require'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in 'require'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in 'new_constants_in'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in 'require'
/usr/webpages/kete2/vendor/plugins/acts_as_zoom/init.rb:1:in 'evaluate_init_rb'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/rails/plugin.rb:95:in 'evaluate_init_rb'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in 'silence_warnings'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/rails/plugin.rb:91:in 'evaluate_init_rb'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/rails/plugin.rb:44:in 'load'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:33:in 'load_plugins'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in 'each'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in 'load_plugins'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/initializer.rb:283:in 'load_plugins'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/initializer.rb:138:in 'process'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/initializer.rb:93:in 'send'
/usr/webpages/kete2/config/../vendor/rails/railties/lib/initializer.rb:93:in 'run'
/usr/webpages/kete2/config/environment.rb:33
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in 'gem_original_require'
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in 'require'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in 'require'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in 'new_constants_in'
/usr/webpages/kete2/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in 'require'
/usr/webpages/kete2/vendor/rails/railties/lib/tasks/misc.rake:3
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in 'call'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in 'execute'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in 'each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in 'execute'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in 'invoke_with_call_chain'
/usr/lib64/ruby/1.8/monitor.rb:242:in 'synchronize'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in 'invoke_with_call_chain'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in 'invoke_prerequisites'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in 'each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in 'invoke_prerequisites'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in 'invoke_with_call_chain'
/usr/lib64/ruby/1.8/monitor.rb:242:in 'synchronize'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in 'invoke_with_call_chain'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in 'invoke_prerequisites'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in 'each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in 'invoke_prerequisites'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in 'invoke_with_call_chain'
/usr/lib64/ruby/1.8/monitor.rb:242:in 'synchronize'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in 'invoke_with_call_chain'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in 'invoke'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in 'invoke_task'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in 'top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in 'each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in 'top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in 'standard_exception_handling'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in 'top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in 'run'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in 'standard_exception_handling'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in 'run'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/bin/rake:19:in 'load'
/usr/bin/rake:19
Can we do a manually mysql data import ? I am from PHP. So my knowledge about ruby is nearly 0.
Really appreciate if anyone has any ideas about it.
Thanks for reading,
Ann
Tags: cannot load default data
Just more info.
I already edit the host in the database.yml to the server ip address.
Thanks,
Ann
Hey Ann Le,
From the looks of it, you're using the most recent codebase (nokogiri is a Ruby Gem used in Kete 1.2).
This site only has installation articles for 1.1, so some require installation steps may be missing.
Try running the following and give it another shot.
rake manage_gems:required:install
rake manage_gems:testing:install
Regards
Kieran
Tags: Installation, openSUSE, 1.2, gems, nokogiri
Hi Ann,
Nokogiri is actually a Ruby gem that you need to install or possibly is not visible to your Unix user (root user it sounds like) because it can't be found in its PATH.
Try installing it and see if that helps:
gem install nokogiri
Tags: nokogiri, Troubleshooting, ruby, gems
Ann Le
said rake db:bootstrap
The data loading is OK now.
Thank Kieran and Walter.
Ann
When I run this command:
rake manage_gems:required:install
It stalls at this point:
"sudo gem install hoe && sudo gem install tenderlove-frex -s http://gems.github.com && sudo gem install racc"
And I've left it for like half an hour and nothing happens.
Whereas it appears to install others fine:
$ rake --trace manage_gems:required:install
(in /home/kete/apps/thestan)
** Invoke manage_gems:required:install (first_time)
** Execute manage_gems:required:install
** Execute manage_gems:exec_action
"Requires sudo or root privileges. You will be prompted for password if necessary."
"sudo gem install -y memcache-client"
"sudo gem install -y packet"
"sudo gem install hoe && sudo gem install tenderlove-frex -s http://gems.github.com && sudo gem install racc"
I'm doing this as the kete user, and the kete user owns the ruby directory tree. This is on Ubuntu 8.04 Hardy Heron, and I'm trying to install Kete 1.2. Any advice would be greatly appreciated, since I'm stalled at this point. Thanks,
Roy
Roy Tennant
said Update
So sorry, in returning to this problem I discovered that the "kete" user had been created with a different shell (inexplicably, to me at least) and the .bashrc (and therefore the PATH statement) was not being read. I also had a different syntax for the PATH statement than elsewhere (like my account) where the "which gem" command returned the right path. Thanks a lot for that check, by the way, as it made it easy to see where the problem was.
However, the installation still stalls at the same point:
"sudo gem install hoe && sudo gem install tenderlove-frex -s http://gems.github.com && sudo gem install racc"
I suspect that since I was installing it improperly the first time and that I had to abort it, that there is some cleanup I need to do before attempting it again, but I don't know enough about the architecture to know where to go to clean things up. Or is it something else?
Roy
these are the steps that I'm taking:
- git clone git://github.com/kete/kete.git myapp
- cd myapp/
- cp config/database.example config/database.yml
- rake db:create
- cp config/backgroundrb.yml.example config/backgroundrb.yml
- rake manage_gems:required:install
- sudo gem install rmagick
- sudo gem install mini_exiftool
- rake db:bootstrap
no such file to load -- nokogiri
What I am missing here? please help me!
Tags: Installation, Kete, 1.2 nokogiri
The latest version of the nokogiri gem has the functionality that we need for Kete. Until the latest nokogiri release, we were required to build it from source before to get the functionality we needed.
This is no longer the case, so we have updated the Kete 1.2's code base to simplify the install. Here's what you need to do:
$ git pull # this will pull down the latest bug fixes for the 1.2 branch if you used git clone to get code
$ rake manage_gems:required:install # repeat this and hopefully all the gems are handled as they should be
Hopefully that does the trick and you can continue on with the installation steps. Sorry for the delay responding.
Tags: bug fixes, Kete 1.2, Installation, gems
hello ,
when i finished kete installation on debian lenny
this message shown
Could not find RubyGem racc (>= 0)
and i installed the gem nokogiri and racc again
but the problem not solved
Hi,
Could you confirm that you followed the instructions that were specific to Debian Lenny users if the gem's didn't install correctly, please? I.e. the bit that starts like this from above topic:
Debian Lenny users: When installing, you might encounter issues with sudo not install gems as it should. If this happens, you'll need to login as root and run the following manually.
root@host: # gem source -a http://gems.github.com
...
Also, as root you should confirm you are using the correct version of the gem command by doing this:
root@host: which gem
You should see a result that indicates are using the gem under Ruby Enterprise Edition, otherwise you may be installing your gems under the Debian default gem command which Kete doesn't use.
Tags: REE, gem, Ruby Enterprise Edition, ruby, RubyGem, rubygems
Re: Walters comments, please make sure you installed it via root, and not via kete user or sudo. When I tested kete installation on Debian Lenny, there were issues with sudo that caused gems not to install properly into the correct directory structure when using Ruby Enterprise Edition (which if you've followed the install guide thus far, you'll probably be using). sudo refused to respect the users path, so used the built in ruby /usr/bin/ruby instead of the REE installed one (/opt/ree/bin/ruby), thus when REE tries to use the gem from the gems directory in the current PATH, it won't find it.
Login as root on the box, run 'which ruby' to make sure it's pointing at Ruby Enterprise Edition, and give installing all the gems as root user another go.
Update: I've made a few updates to the commands Debian Lenny users need to run. Namely, frac gem is no longer needed, rexical gem replaces it, and nokogiri no longer needs to be compiled, just install the gem like normal.
Tags: REE, gem, Ruby Enterprise Edition, ruby, RubyGem, rubygems
hello ,
thanks for help
i follow the steps you mention
and when i run 'which ruby' the result is
/opt/ruby-enterprise-1.8.6-20090610/bin/ruby
but the problem not resolve,
the message still
Could not find RubyGem racc (>= 0)
Which version of Kete are you running? If you're on Kete 1.2, could you please test Kete master (pre 1.3) and see if it has the same problem. If you're running on master already, please make sure it is up to date (try a 'git pull' from the clone of Kete) and check if it still occurs in the latest version.
If it continues to be a problem, I'll need some debug info. For starters, where exactly are you seeing this error occur? When running the server? when running the console? when you browse to the site? Is there a long stack track you can paste or is 'Could not find RubyGem racc (>= 0)' the only thing you can see?
Can you also please run the following to ensure your installation of Rubygems is up to date (on Lenny, run also gem commands as root, not using sudo or the kete account).
root@host: # gem update --system
root@host: # gem update
Then run the following and paste the output in a new comment.
root@host: # gem env
Then path in the GEM PATHS section in that output, list the contents by running ls on the path and putting /gems on the end of it. So mine looks like this:
- GEM PATHS:
- /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8
- /Users/kieran/.gem/ruby/1.8
So I would run the following:
root@host: # ls /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8
........
root@host: # ls /Users/kieran/.gem/ruby/1.8
........
Paste the output in a new comment. In particular, I'm looking for racc in either of these folders. If it isn't, then gem install is either installing to the wrong place, or is failing to install.
Try and reinstall nokogiri on it's own and see if it pulls in the dependancies. If the following commands complain about something relying on it, ignore it. Paste the output of the following command:
root@host: # gem uninstall racc rexical tenderlove-frac nokogiri
root@host: # gem install nokogiri
Hopefully by now it'll be working, else I'll examine the console output you paste and advise some more steps to take.
Ahmad Maher
said racc work but
hello ,
thanks for help ,
racc libraries work well now , but there is another error appears
Tags: magemagick, imagefile
Glad it's working for you now. As for the 'uninitialized constant' error, try running the following (assuming production mode, leave out the RAILS_ENV setting if not):
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake kete:upgrade
Tags: magemagick, imagefile
If Kieran's suggestion doesn't work, you could also try:
$ rake kete:tools:reset RAILS_ENV=production
You might even have to do it twice. My guess for what has happened for you is that you application was partially installed as far as the database schema and perhaps the seed data. By resetting, this should clear the failed stuff out of the way and get ready for configuration again.



petert
said kete installation on Centos 5.1
Hi,
We have been installing kete on Cetos 5.1. All had been going OK until we got to the "topic: prepare the kete application" part. Specifically when we run the command rake prep_app the reponse is a whole lot of errors as below
--------------------------------------------------------------------------------------------------------------------------
rake prep_app
(in /home/kete/apps)
"this may take awhile and have a lot of output. you can ignore warnings."
"requires sudo or root privileges. you will be prompted for password if necessary."
"piston"
password:
sorry, user kete is not allowed to execute '/usr/local/bin/gem install -y piston' as root on commstest.slwa.wa.gov.au.
"capistrano"
sorry, user kete is not allowed to execute '/usr/local/bin/gem install -y capistrano' as root on commstest.slwa.wa.gov.au.
"requires sudo or root privileges. you will be prompted for password if necessary."
"memcache-client"
sorry, user kete is not allowed to execute '/usr/local/bin/gem install memcache-client' as root on commstest.slwa.wa.gov.au.
"mime-types"
sorry, user kete is not allowed to execute '/usr/local/bin/gem install mime-types' as root on commstest.slwa.wa.gov.au.
"unicode"
sorry, user kete is not allowed to execute '/usr/local/bin/gem install unicode' as root on commstest.slwa.wa.gov.au.
"zoom"
sorry, user kete is not allowed to execute '/usr/local/bin/gem install zoom' as root on commstest.slwa.wa.gov.au.
"redcloth"
sorry, user kete is not allowed to execute '/usr/local/bin/gem install redcloth' as root on commstest.slwa.wa.gov.au.
"hpricot"
sorry, user kete is not allowed to execute '/usr/local/bin/gem install hpricot' as root on commstest.slwa.wa.gov.au.
[kete@commstest apps]$
----------------------------------------------------------------------------------------------------------------------------------------------------------------
I am keen to find out if anyone else has tried an installation on Centos and if they had (or solved) this problem or if anyone can suggest what the fix is.
We had selinux turned on at one stage, but it is now deactivated.
Many Thanks
PeterT