Task Body Missing
Reported by Nate | September 14th, 2007 @ 04:09 AM
With no ~/.sake file, I run:
The resulting ~/.sake contains:
desc 'Launches the database shell using the values defined in config/database.yml'
task 'db:shell' => [ 'environment' ] do
end
I have tried:
- Installing it from a local file
- Installing it remotely
- Using sudo
- Restarting terminal
- Installing many others remotely
Software/System:
- Mac OS X 10.4.10 (8R2218) Intel
- ruby 1.8.6 (installed through macports)
- gem 0.9.4 (installed through macports
- rake 0.7.3 (installed through rubygems)
- sake 1.0.11 (installed through rubygems)
- ruby2ruby 1.1.7 (installed through rubygems)
Any help would be appreciated, thanks.
Nate Sutton
Comments and changes to this ticket
-
Chris Wanstrath September 16th, 2007 @ 12:45 PM
- → State changed from new to hold
$ sake -e http://sakebar.railsrumble.com/s... desc 'Launches the database shell using the values defined in config/database.yml' task 'db:shell' => [ 'environment' ] do config = ActiveRecord::Base.configurations[(RAILS_ENV or "development")] command = "" case config["adapter"] when "mysql" then (command << "mysql ") (command << "--host=#{(config["host"] or "localhost")} ") (command << "--port=#{(config["port"] or 3306)} ") (command << "--user=#{(config["username"] or "root")} ") (command << "--password=#{(config["password"] or "")} ") (command << config["database"]) when "postgresql" then (command << "psql82 ") (command << "-h #{(config["host"] or "localhost")} ") (command << "-p #{(config["port"] or 5432)} ") (command << "-U #{(config["username"] or "postgres")} ") (command << config["database"]) else (command << "echo Unsupported database adapter: #{config["adapter"]}") end system(command) endRuby 1.8.6 (macports)
ruby2ruby 1.1.7
rake 0.7.3
sake 1.0.11
This is very strange indeed. You may have to debug this on your own? I would start by printing the `tasks' variable set at line 234 of sake.rb. Run the URL you mentioned with -e and see what is in that variable.
-
Nate November 21st, 2007 @ 09:24 PM
It doesn't affect me now, and I never debugged it. So, since there's no way to recreate it you can probably close this. Oh, and where is sakebar now?
-
Brad Greenlee February 5th, 2008 @ 02:34 PM
I was having the same problem. I fixed it by tweaking sake.rb to use the latest ParseTree (2.1.1) rather than 2.0.1.
-
Don Petersen April 23rd, 2008 @ 09:54 PM
I tried to debug this myself, but I got pretty lost once it got into ruby2ruby. Bottom line, where you were expecting the task body, you got nothing. Big news flash, I know.
I completely uninstalled ParseTree(I had versions 2.0.1, 2.0.2, and 2.1.1) and ruby2ruby(I had versions 1.1.7 and 1.1.8), and reinstalling them. Problem solved.
For grins I tried reinstalling the old versions of those two gems to see if one triggered the issue, but I could never get it to break again.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
