You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting a 500 internal server error when trying to access the basic TaskRabbit API through the ruby gem, although I am able to do some API access using curl from the command line.
API_SECRET and API_KEY correspond to the Application Secret and Application ID obtained from the dev area of TaskRabbit. (I'm assuming Application ID == API Key here. If not, maybe that's the issue, but I don't see where to get the API Key if it's not the App ID.)
Then in rails console, I try this snippet from the documentation:
tr = Taskrabbit::Api.new
tasks = tr.tasks.all
Using the production base uri, I get this error:
Taskrabbit::Error: 412 Precondition Failed
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/client.rb:42:in check_response_errors' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/api_smith-1.0.0/lib/api_smith/client.rb:115:inrequest!'
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/api_smith-1.0.0/lib/api_smith/client.rb:40:in get' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/api.rb:27:inrequest'
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/task.rb:37:in all' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:58:inload_found'
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:46:in proxy_found' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:17:inall'
from (irb):2
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in start' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:8:instart'
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands.rb:41:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `
'
Using the sandbox base uri, I get this error:
Taskrabbit::Error: 500 Internal Server Error
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/client.rb:42:in check_response_errors' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/api_smith-1.0.0/lib/api_smith/client.rb:115:inrequest!'
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/api_smith-1.0.0/lib/api_smith/client.rb:40:in get' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/api.rb:27:inrequest'
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/task.rb:37:in all' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:58:inload_found'
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:46:in proxy_found' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:17:inall'
from (irb):3
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in start' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:8:instart'
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands.rb:41:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `
'
Any ideas?
The text was updated successfully, but these errors were encountered:
I am getting a 500 internal server error when trying to access the basic TaskRabbit API through the ruby gem, although I am able to do some API access using curl from the command line.
Here's my config:
Taskrabbit.configure do |config|
config.api_secret = 'XXX'
config.api_key = 'XXX'
config.base_uri = Rails.env.production? ? 'https://www.taskrabbit.com' : 'https://sandbox.taskrabbit.in'
config.endpoint = 'api/v2'
end
API_SECRET and API_KEY correspond to the Application Secret and Application ID obtained from the dev area of TaskRabbit. (I'm assuming Application ID == API Key here. If not, maybe that's the issue, but I don't see where to get the API Key if it's not the App ID.)
Then in rails console, I try this snippet from the documentation:
tr = Taskrabbit::Api.new
tasks = tr.tasks.all
Using the production base uri, I get this error:
'Taskrabbit::Error: 412 Precondition Failed
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/client.rb:42:in
check_response_errors' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/api_smith-1.0.0/lib/api_smith/client.rb:115:in
request!'from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/api_smith-1.0.0/lib/api_smith/client.rb:40:in
get' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/api.rb:27:in
request'from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/task.rb:37:in
all' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:58:in
load_found'from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:46:in
proxy_found' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:17:in
all'from (irb):2
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in
start' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:8:in
start'from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands.rb:41:in
<top (required)>' from script/rails:6:in
require'from script/rails:6:in `
Using the sandbox base uri, I get this error:
Taskrabbit::Error: 500 Internal Server Error
'from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/client.rb:42:in
check_response_errors' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/api_smith-1.0.0/lib/api_smith/client.rb:115:in
request!'from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/api_smith-1.0.0/lib/api_smith/client.rb:40:in
get' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/api.rb:27:in
request'from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/task.rb:37:in
all' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:58:in
load_found'from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:46:in
proxy_found' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/taskrabbit-0.1.0/lib/taskrabbit/proxy.rb:17:in
all'from (irb):3
from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in
start' from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:8:in
start'from /Users/dan/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands.rb:41:in
<top (required)>' from script/rails:6:in
require'from script/rails:6:in `
Any ideas?
The text was updated successfully, but these errors were encountered: