[Biocatalogue-hackers] Question on local set up
Jackson, Tod
jackson4 at uillinois.edu
Tue Mar 16 13:19:17 EDT 2010
Excellent, thanks for the quick response! I have not configured any memcache servers. I'll look into that. I'll also get it working with Mongrel just to make sure I've got that working (for reference). I did notice on the wiki that you've got quite a few of other configuration steps that I didn't do either so I'm sure this will do the trick and along with the wiki, we should be able to make much more progress.
Thanks again,
Tod
-----Original Message-----
From: Jiten Bhagat [mailto:jits at cs.man.ac.uk]
Sent: Tuesday, March 16, 2010 12:15 PM
To: Jackson, Tod
Cc: biocatalogue-hackers at rubyforge.org; Wheat, Stephen - openii; Jackson, Thomas S; Ament, Susan S
Subject: Re: Question on local set up
Hello Tod,
I'll try and help as much as I can.
When you run "script/server" then the web app will be accessible from
http://localhost:3000/
I recommend you use Mongrel instead of WEBrick. Running:
[sudo] gem install mongrel
... is all you need to do. Then script/server will use mongrel by
default. (Oh, reading to the end of your email I've noticed you're using
Passenger instead. I'll leave these instructions for future ref).
The stack trace below implies that it is failing to connect to the
memcache server(s). I can only apologise for the unhelpful error
message! Have you configured a/some memcached server(s) in
config/memcache.yml ? If you have, those need to be accessible to the
app. Alternatively you can just leave that whole config file blank and
the app will use an in memory cache instead. (Remember to run 'touch
tmp/restart.txt' to restart the application).
I would recommend reverting the code change you made (though it only
disables the newsfeed on the homepage).
Hope that helps! Let me know if there's anything else.
Cheers,
Jits
Jackson, Tod wrote:
>
> Greetings,
>
> I and some colleagues from Emory University have been working on
> getting an instance of the Biocatalogue application deployed locally
> in hopes that it might be useful in a project we’re participating in
> called EdUnify (_http://www.pesc.org/interior.php?page_id=204_) which
> is sponsored by the PESC organization (_http://www.pesc.org/_).
>
> I’ve been working with Ruby 1.8.7 on Ubuntu 9.10. While I was able to
> get it working, I had to make some modifications that I’m sure aren’t
> correct so I thought I would post what I did here and see what I may
> be missing. DISCLAIMER: I’m new to Ruby on Rails but do have a
> strong development background especially in Java. Also, I did all of
> this before the wiki
> (_http://www.biocatalogue.org/wiki/doku.php?id=development:codebase_guidelines_)
> was available so I will be checking that out to see if I could have
> missed anything important with my trial and error approach.
>
> Here’s a high-level overview of the steps I took:
>
> - Exported the latest code base from the SVN repository to my
> local environment (www/biocat)
>
> - Changed all the *.yml.pre to *.yml etc.
>
> - Ran a rake db:create/migrate
>
> - Installed a few missing gems
>
> - Once I got the basic environment where it needed to be in the
> first 4 steps above, I ran it with the WEBrick app server
> (script/server from my www/biocat directory)
>
> - Then, I tried to access the app by going to:
> _http://localhost:3000/biocat/home_
>
> Below is the stack trace that I got when I performed the basic steps
> listed above. The error was “wrong number of arguments (0 for 1)”
> Based on the information in the stack trace, I found the code location
> where I thought the error was occurring and it was this line in the
> activity_feeds_helper.rb file: “al_items =
> Rails.cache.read(cach_key)” in my file it was line #44. So, to get
> around this, I just commented out that line and replaced it with an
> empty al_items = [ ]. Obviously, this is a hack but it did get me
> around the error and allowed me to basically run the app locally.
> Once I had it “running” and accessible, I set up Passenger and was
> able to run it via Apache as well.
>
> My question is what does this kind of error indicate? In the Java
> world, I would probably lean toward a deprecated API or something like
> that? i.e., perhaps this works with earlier versions but is no longer
> supported in 1.8.7 or something like that? I haven’t dug into the
> Rails.cache API so I’m not sure if my assessment is accurate or not so
> I thought posting it here might be a good place to start while I look
> into that a bit more myself.
>
> I thank you in advance for any help.
>
> Tod Jackson
>
> University of Illinois
>
> * ArgumentError in Home#index *
>
> Showing/ app/views/home/_activity.html.erb/ where line* #16* raised:
>
> wrong number of arguments (0 for 1)
>
> Extracted source (around line* #16*):
>
> 13: style = :simple unless local_assigns.has_key?(:style)
>
> 14: %>
>
> 15:
>
> 16: <% unless (entries = activity_entries_for_home(style)).empty? %>
>
> 17: <% if style == :simple %>
>
> 18: <div class="activity_feed">
>
> 19: <% entries.each do |e| %>
>
> Trace of template inclusion: app/views/home/index.html.erb
>
> RAILS_ROOT: /home/jackson4/www/biocat
>
> _Application Trace_ <http://localhost/home> | _Framework Trace_
> <http://localhost/home> | _Full Trace_ <http://localhost/home>
>
> /home/jackson4/www/biocat/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.6.5/memcache.rb:813:in
> `warn'
>
> /home/jackson4/www/biocat/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.6.5/memcache.rb:813:in
> `socket'
>
> /home/jackson4/www/biocat/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.6.5/memcache.rb:611:in
> `with_socket_management'
>
> /home/jackson4/www/biocat/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.6.5/memcache.rb:526:in
> `cache_get'
>
> /home/jackson4/www/biocat/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.6.5/memcache.rb:195:in
> `get'
>
> /home/jackson4/www/biocat/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.6.5/memcache.rb:639:in
> `with_server'
>
> /home/jackson4/www/biocat/vendor/rails/activesupport/lib/active_support/vendor/memcache-client-1.6.5/memcache.rb:194:in
> `get'
>
> /home/jackson4/www/biocat/vendor/rails/activesupport/lib/active_support/cache/mem_cache_store.rb:48:in
> `read'
>
> /home/jackson4/www/biocat/vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb:39:in
> `read'
>
> /home/jackson4/www/biocat/app/helpers/activity_feeds_helper.rb:44:in
> `activity_entries_for_home'
>
> /home/jackson4/www/biocat/app/helpers/activity_feeds_helper.rb:35:in
> `activity_entries_for_home'
>
> /home/jackson4/www/biocat/app/views/home/_activity.html.erb:16:in
> `_run_erb_app47views47home47_activity46html46erb_locals_activity_object'
>
> /home/jackson4/www/biocat/app/views/home/index.html.erb:80:in
> `_run_erb_app47views47home47index46html46erb'
>
> /home/jackson4/www/biocat/app/controllers/home_controller.rb:12:in `index'
>
More information about the Biocatalogue-hackers
mailing list