documentcloud / cloud-crowd
- Source
- Commits
- Network (12)
- Issues (3)
- Downloads (12)
- Wiki (10)
- Graphs
-
Branch:
master
-
crowd server Starting CloudCrowd Central Server on port 9173... /Users/dave/tmp/cr/config.ru:18:in `block in <main>': undefined method `dirname' for Rack::File:Class (NoMethodError)Technically I believe this is a problem with thin, but there's a simple workaround in config.ru. It's caused by thin evaling config.ru in the context of Rack, which has its own Rack::File class.
The trivial workaround is to change config.ru created by cloud to contain
CloudCrowd.configure(::File.dirname(__FILE__) + '/config.yml') CloudCrowd.configure_database(::File.dirname(__FILE__) + '/database.yml')that is, put a '::' in front of the two File constants.
Cheers
Dave
Comments
-
Hi,
Doing this :
http://wiki.github.com/documentcloud/cloud-crowd/getting-started
I get this:
$ ~/config/cloud-crowd# crowd node Starting CloudCrowd Node on port 9063... /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/cloud-crowd-0.2.5/lib/cloud-crowd.rb:167:in `actions': One of your actions failed to load. Please ensure that the name of your action class can be deduced from the name of the file. ex: 'word_count.rb' => 'WordCount' (NameError) uninitialized constant Module::ShakespeareWordCount from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/cloud-crowd-0.2.5/lib/cloud_crowd/node.rb:70:in `initialize' from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:893:in `new' from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:893:in `new' from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/cloud-crowd-0.2.5/bin/../lib/cloud_crowd/command_line.rb:115:in `start_node' from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/cloud-crowd-0.2.5/bin/../lib/cloud_crowd/command_line.rb:104:in `run_node' from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/cloud-crowd-0.2.5/bin/../lib/cloud_crowd/command_line.rb:42:in `initialize' from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/cloud-crowd-0.2.5/bin/crowd:5:in `new' from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/cloud-crowd-0.2.5/bin/crowd:5 from /opt/ruby/bin/crowd:19:in `load' from /opt/ruby/bin/crowd:19?? Am I missing something ??
Thanx!
Comments
documentcloud
Sat Oct 03 04:11:08 -0700 2009
| link
It just looks like you're requesting an action that doesn't exist. The name of the built-in action is 'word_count', not 'shakespeare_word_count'.
Sorry for the confusion between the name of the script that launches the job and the name of the action itself -- I'll fix it.
-
Instead of MySQL?
Comments
documentcloud
Thu Sep 17 07:25:29 -0700 2009
| link
Um, sure. You mean for the test DB? Sounds fine. Do you think it would be appropriate for a production DB for this use? Stepping down this path means creating a whole suite of db management tools in 'crowd', I think -- perhaps something we should stay agnostic about.
no not appropriate for production. Ah, I just looked at the rake task for creating the test DB and it is MySQL specific.
Well the good news about the SQLite3 driver is that if you connect to a file db that does not yet exist, it will be created on the fly. Hence
crowd load_schemawill still work with a database.yml file that has:
# This is a standard ActiveRecord database.yml file. You can configure it # to use any database that ActiveRecord supports. :adapter: sqlite3 :database: cloud_crowd.dbI'm sorry -- scratch the previous comment -- I'm still half asleep. You mean in database.yml... The central database (and work queue) is the only real bottleneck that prevents a CloudCrowd installation from scaling. I think it's proper to have the more robust MySQL be the default database adapter. You know what they say about defaults ... they never get changed.
That's good news -- here's the plan. MySQL stays default in config.yml -- I'll add a commented-out bit about SQLite for development, with the simple sqlite configuration. For testing, SQLite will be the default, and I can get rid of that rake task.





Thanks for the patch. I've added it to master, and it'll go out with the next release. I just have one question before closing the ticket. I can't reproduce it on my environment (Ruby 1.8.7, Thin 1.2.5, Rack 1.0.1, OSX), and haven't heard of other Ruby 1.9 folks running into it. What exactly are you running that causes this bug to come to light?
dave[tmp/cr 0:04:09] ruby1.9 -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10]
dave[tmp/cr 0:04:27] for i (thin rack cloud-crowd); do; gem1.9 list $i; done
thin (1.2.5)
rack (1.0.1)
cloud-crowd (0.3.0)
The problem also happens if you just run thin:
dave[tmp/cr 0:06:24] thin -p 8776 -R config.ru start
config.ru:18:in
block in <main>': undefined methoddirname' for Rack::File:Class (NoMethodError)I'm happy to dig further if there's something specific I can do.
Dave
Thanks -- I appreciate it. Looks like Ruby1.9/Thin is the trouble spot. I'm closing this ticket, and will let macournoyer know about it.