I have a callback URL that is outlined in the MessagesController like so:
def message_create
message = Message.new( :message => params[:PAYLOAD],
:recipient => params[:DEST_ADDR],
:api_message_id => params[:MSG_ID],
:from => params[:SRC_ADDR],
:api_timestamp => params[:DATETIME],
:network => params[:NETWORK],
:origin => "sms")
message.save
redirect_to message
end
When I run my app locally this callback URL works just fine:
http://localhost:3000/message_create?PAYLOAD=asdfasdf&DEST_ADDR=234523&MSG_ID=23452345&SRC_ADDR=24345234234&DATETIME=20110915130534&NETWORK=blah
However, when I push the app to heroku and enter the same callback URL:
http://myapp.heroku.com/message_create?PAYLOAD=asdfasdf&DEST_ADDR=234523&MSG_ID=23452345&SRC_ADDR=24345234234&DATETIME=20110915130534&NETWORK=blah
It just gives me an error. I've looked into whether it's due to the:
before_filter :authenticate
line in my controller but even when that's commented out the data just won't submit to the remote DB. Your thoughts and experience are very-much appreciated.
UPDATE:
Just worked out how to access the full logs on Heroku. Looks like the issue might be to do with integer's not being large enough in Heroku by default:
2011-09-15T13:25:28+00:00 app[web.1]: Started GET "/message_create?PAYLOAD=asdfasdf&DEST_ADDR=234523&MSG_ID=23452345&SRC_ADDR=24345234234&DATETIME=20110915130534&NETWORK=blah" for 80.46.10.63 at 2011-09-15 06:25:28 -0700
2011-09-15T13:25:28+00:00 app[web.1]: Processing by MessagesController#message_create as HTML
2011-09-15T13:25:28+00:00 app[web.1]: Parameters: {"PAYLOAD"=>"asdfasdf", "DEST_ADDR"=>"234523", "MSG_ID"=>"23452345", "SRC_ADDR"=>"24345234234", "DATETIME"=>"20110915130534", "NETWORK"=>"blah"}
2011-09-15T13:25:28+00:00 app[web.1]: Completed in 10ms
2011-09-15T13:25:28+00:00 app[web.1]:
2011-09-15T13:25:28+00:00 app[web.1]: ActiveRecord::StatementInvalid (PGError: ERROR: integer out of range
2011-09-15T13:25:28+00:00 app[web.1]: : INSERT INTO "messages" ("message", "created_at", "updated_at", "recipient", "api_message_id", "from", "origin", "timestamps", "user_id", "status", "api_timestamp", "network", "group_id") VALUES ('asdfasdf', '2011-09-15 13:25:28.650894', '2011-09-15 13:25:28.650894', 234523, 23452345, 24345234234, 'sms', NULL, NULL, NULL, '2011-09-15 13:05:34.000000', 'blah', NULL) RETURNING "id"):
2011-09-15T13:25:28+00:00 app[web.1]: app/controllers/messages_controller.rb:48:in `message_create'
2011-09-15T13:25:28+00:00 app[web.1]:
2011-09-15T13:25:28+00:00 app[web.1]:
2011-09-15T13:25:28+00:00 heroku[router]: GET www.myherokuapp.com/message_create dyno=web.1 queue=0 wait=0ms service=14ms status=500 bytes=728
2011-09-15T13:25:28+00:00 heroku[nginx]: 80.46.10.63 - - [15/Sep/2011:06:25:28 -0700] "GET /message_create?PAYLOAD=asdfasdf&DEST_ADDR=234523&MSG_ID=23452345&SRC_ADDR=24345234234&DATETIME=20110915130534&NETWORK=blah HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.12 Safari/535.2" www.myherokuapp.com
Yes it seems like a data type error, what data types did you set for your fields on the messages table migration?
Related
I'm not sure what might be the issue, but whenever I try to make a post request from my express application, I keep getting a create Error as response from axios.
First off my VS Code hinted that post does not exist on axios.
Here is my code
const axios = require('axios');
let oAuthRequestTokenURL = `https://api.twitter.com/oauth/request_token`;
axios.post(oAuthRequestTokenURL, {}).then((response) => {
let initialTokenResponse = response.data;
console.log(`ResponseData=${JSON.stringify(initialTokenResponse, null, 2)}`);
}).catch((e) => {
console.log(e);
});
Here is the error message I keep getting back
Error: Request failed with status code 400
2021-09-15T12:47:14.157656+00:00 app[web.1]: at createError (/app/node_modules/axios/lib/core/createError.js:16:15)
2021-09-15T12:47:14.157656+00:00 app[web.1]: at settle (/app/node_modules/axios/lib/core/settle.js:17:12)
2021-09-15T12:47:14.157657+00:00 app[web.1]: at IncomingMessage.handleStreamEnd (/app/node_modules/axios/lib/adapters/http.js:236:11)
2021-09-15T12:47:14.157658+00:00 app[web.1]: at IncomingMessage.emit (node:events:406:35)
2021-09-15T12:47:14.157658+00:00 app[web.1]: at endReadableNT (node:internal/streams/readable:1343:12)
2021-09-15T12:47:14.157658+00:00 app[web.1]: at processTicksAndRejections (node:internal/process/task_queues:83:21) {
2021-09-15T12:47:14.157659+00:00 app[web.1]: config: {
2021-09-15T12:47:14.157659+00:00 app[web.1]: url: 'https://api.twitter.com/oauth/request_token',
2021-09-15T12:47:14.157660+00:00 app[web.1]: method: 'post',
2021-09-15T12:47:14.157660+00:00 app[web.1]: headers: {
2021-09-15T12:47:14.157660+00:00 app[web.1]: Accept: 'application/json, text/plain, */*',
2021-09-15T12:47:14.157660+00:00 app[web.1]: 'Content-Type': 'application/json',
2021-09-15T12:47:14.157661+00:00 app[web.1]: 'User-Agent': 'axios/0.19.2'
2021-09-15T12:47:14.157661+00:00 app[web.1]: },
What could be wrong?
Thanks in anticipation of your response.
I'm running an application with Elixir 1.7.2 and Phoenix but it randomly crashed with errors in one of my child processes.
I'm using a module called redix - {:redix, ">= 0.6.1"} which is handling my connection to Redis.
It crashed with the following error:
2019-05-16T07:29:08.929601+00:00 app[web.1]: 07:29:08.929 [info] Running ReviewedoWeb.Endpoint with Cowboy using http://:::46402
2019-05-16T07:29:09.191365+00:00 app[web.1]: 07:29:09.191 [info] Application reviewedo exited: Reviewedo.Application.start(:normal, []) returned an error: shutdown: failed to start child: Reviewedo.RedisClientSupervisor
2019-05-16T07:29:09.191385+00:00 app[web.1]: ** (EXIT) shutdown: failed to start child: Reviewedo.Accounts.Cache
2019-05-16T07:29:09.191387+00:00 app[web.1]: ** (EXIT) an exception was raised:
2019-05-16T07:29:09.191393+00:00 app[web.1]: ** (ArgumentError) the user in the Redis URI is ignored and should not be present, got: "h"
2019-05-16T07:29:09.191394+00:00 app[web.1]: (redix) lib/redix/uri.ex:30: Redix.URI.password/1
2019-05-16T07:29:09.191396+00:00 app[web.1]: (redix) lib/redix/uri.ex:15: Redix.URI.opts_from_uri/1
2019-05-16T07:29:09.191397+00:00 app[web.1]: (redix) lib/redix.ex:290: Redix.start_link/2
2019-05-16T07:29:09.191398+00:00 app[web.1]: (stdlib) supervisor.erl:365: :supervisor.do_start_child/2
2019-05-16T07:29:09.191399+00:00 app[web.1]: (stdlib) supervisor.erl:348: :supervisor.start_children/3
2019-05-16T07:29:09.191400+00:00 app[web.1]: (stdlib) supervisor.erl:314: :supervisor.init_children/2
2019-05-16T07:29:09.191402+00:00 app[web.1]: (stdlib) gen_server.erl:365: :gen_server.init_it/2
2019-05-16T07:29:09.191403+00:00 app[web.1]: (stdlib) gen_server.erl:333: :gen_server.init_it/6
2019-05-16T07:29:10.716373+00:00 app[web.1]: {"Kernel pid terminated",application_controller,"{application_start_failure,reviewedo,{{shutdown,{failed_to_start_child,'Elixir.Reviewedo.RedisClientSupervisor',{shutdown,{failed_to_start_child,'Elixir.Reviewedo.Accounts.Cache',{'EXIT',{#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',message => <<\"the user in the Redis URI is ignored and should not be present, got: \\"h\\"\">>},[{'Elixir.Redix.URI',password,1,[{file,\"lib/redix/uri.ex\"},{line,30}]},{'Elixir.Redix.URI',opts_from_uri,1,[{file,\"lib/redix/uri.ex\"},{line,15}]},{'Elixir.Redix',start_link,2,[{file,\"lib/redix.ex\"},{line,290}]},{supervisor,do_start_child,2,[{file,\"supervisor.erl\"},{line,365}]},{supervisor,start_children,3,[{file,\"supervisor.erl\"},{line,348}]},{supervisor,init_children,2,[{file,\"supervisor.erl\"},{line,314}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,365}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,333}]}]}}}}}},{'Elixir.Reviewedo.Application',start,[normal,[]]}}}"}
2019-05-16T07:29:10.717128+00:00 app[web.1]: Kernel pid terminated (application_controller) ({application_start_failure,reviewedo,{{shutdown,{failed_to_start_child,'Elixir.Reviewedo.RedisClientSupervisor',{shutdown,{failed_to_start_child,'Elixir
2019-05-16T07:29:10.719206+00:00 app[web.1]:
2019-05-16T07:29:13.269465+00:00 heroku[web.1]: State changed from up to crashed
2019-05-16T07:29:13.189754+00:00 app[web.1]: Crash dump is being written to: erl_crash.dump...done
2019-05-16T07:29:13.256383+00:00 heroku[web.1]: Process exited with status 1
I hadn't made any source code changes before the crash and so I'm not sure what the cause is.
The error I'm seeing is this one:
https://github.com/whatyouhide/redix/blob/master/lib/redix/uri.ex#L31
It looks like it's trying to split my redis_url to get the user and password but it's coming up with h for the user. The redis_url that was generated for me looks similar to this:
redis://h:pf851f7d83mf93nrand0mha5hsh8kgl3h4334k73d82580bba59d4c237f33f24752c76c#ec2-45-81-27-450.region.compute.amazonaws.com:18324
Here are the modules that it is erroring on:
defmodule Reviewedo.RedisClientSupervisor do
#moduledoc """
Initiates Redis
"""
use Supervisor
alias Reviewedo.Accounts.Cache
def start_link do
Supervisor.start_link(__MODULE__, [])
end
def init(_) do
redis_url = System.get_env("REDIS_URL") || "redis://127.0.0.1:6379"
children = [
worker(Cache, [redis_url, :redix], [])
]
supervise(children, strategy: :one_for_one)
end
end
defmodule Reviewedo.Accounts.Cache do
#moduledoc """
Provides cache functionality
"""
def start_link(connection, name) do
Redix.start_link(connection, name: name)
end
def query(param), do: Redix.command(:redix, param)
def get(key), do: query(["get", key])
def set(key, value), do: query(["set", key, value])
def expire(key, seconds), do: query(["expire", key, seconds])
def del(key), do: query(["del", key])
def all_keys!() do
case query(["keys", "*"]) do
{:ok, keys} -> keys
_ -> raise Reviewedo.RedisConnectionError, query: "all_keys!/1"
end
end
def flushdb do
query(["flushdb"])
:ok
end
end
defmodule Reviewedo.RedisConnectionError do
#moduledoc """
Raised when a Cache query returns an error
This exception is raised by `Reviewedo.Accounts.Cache` and `Reviewedo.Accounts.CacheAPI` which:
"""
defexception [:message]
def exception(query: query) do
msg = "Redis connection error, calling query: `#{query}`"
%Reviewedo.RedisConnectionError{message: msg}
end
end
It looks as though it's failing to get my opts from the uri but I'm not quite sure why. The application is running fine locally so it must be something to do with the configuration on Heroku.
Has anyone experienced anything similar to this before or know what the problem might be?
Thanks in advance!
I have Mandrill set up to send SMTP email on Heroku. My app is a rails app. When a user signs up, it sends the email as expected. However, I have also set up an "invitation" action that lets users invite other users by email. This is not getting sent, though the logs suggest it is and no error is thrown. I have:
config.action_mailer.raise_delivery_errors = true
Here are the relevant logs:
2014-07-17T07:23:06.739778+00:00 app[web.1]: Started POST "/courses/collaborate" for 88.112.253.45 at 2014-07-17 07:23:06 +0000
2014-07-17T07:23:06.885997+00:00 app[web.1]:
2014-07-17T07:23:06.886001+00:00 app[web.1]: Sent mail to *********#gmail.com (87ms)
2014-07-17T07:23:06.886794+00:00 app[web.1]: Redirected to http://**********.herokuapp.com/courses/*
2014-07-17T07:23:06.978772+00:00 app[web.1]: Started GET "/courses/*" for 88.112.253.45 at 2014-07-17 07:23:06 +0000
2014-07-17T07:23:06.742954+00:00 app[web.1]: Processing by CoursesController#collaborate as HTML
2014-07-17T07:23:06.742984+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"*********", "user"=>"******", "email"=>"**********#gmail.com", "title"=>"************* Vocab", "course"=>"*", "key"=>"", "commit"=>"Send Invitation"}
2014-07-17T07:23:06.886962+00:00 app[web.1]: Completed 302 Found in 96ms (ActiveRecord: 0.0ms)
2014-07-17T07:23:06.981777+00:00 app[web.1]: Processing by CoursesController#show as HTML
2014-07-17T07:23:06.797782+00:00 app[web.1]: Rendered user_mailer/collaborate.text.erb (0.1ms)
It seems that the mail is getting sent before the user_mailer is rendered but I don't know why. I've done it like this:
1) A form sends the params you see above to the collaborate action in the controller.
2) This action looks like this:
def collaborate
#user = params[:user]
#title = params[:title]
#course = params[:course]
#email = params[:email]
#key = params[:key]
UserMailer.collaborate(#user, #title, #course, #email, #key).deliver
redirect_to course_path(#course), notice: 'Invitation sent!'
end
3) The UserMailer.collaborate looks like this:
def collaborate(user, title, course, email, key)
#user = user
#title = title
#course = course
#email = email
#key = key
mail from: #user, to: #email, subject: "Please join me creating a course!"
end
4) collaborate.text.erb is just a message that uses the instance variables I set up.
The solution is that the form was automatically generating a :put and not a :get request. For some reason this wasn't a problem on the local server but pushed to production it was preventing the mail getting sent out. The key is to override the default form_tag :put request with a :get request.
I'm following Railscast #199 to allow my web app to be viewed in a mobile browser. It works great, except when I try to access information in a tabbed interface using UJS in the mobile version. Clicking on the tabs works in the web app, but on the mobile side I get a 406 error. (I tried this after setting the User Agent as iPhone in Safari. I also tested on iOS Simulator and my iPhone. Neither time loaded anything.)
Below is some code for one of the tabs. Can anyone can help me target what is going on? Here is my code.
Here's the profile_about action in profiles_controller.rb:
def profile_about
#profile = Profile.find(params[:id])
respond_to do |format|
format.js { render :layout => nil }
end
end
In my profiles/show.mobile.erb (this is the exact same code as in profiles/show.html.erb):
<div id="tabs">
<ul id="infoContainer">
<li><%= link_to "Cred", profile_cred_profile_path, :class=> 'active', :remote => true %></li>
<li><%= link_to "About", profile_about_profile_path, :class=> 'inactive', :remote => true %></li>
</ul>
<div id="tabs-1">
<%= render :partial => 'profile_cred' %>
</div>
</div><!-- end tabs -->
(NOTE: I have a file for profiles/_profile_about.html.erb and profiles/_profile_about.mobile.erb.)
Here is my profiles/profile_about.js.erb:
$("#tabs-1").html("<%= escape_javascript(render(:partial => 'profile_about'))%>");
My Heroku logs showing the 406:
2012-03-08T03:02:55+00:00 app[web.1]: Started GET "/profiles/1/profile_about" for 98.218.231.113 at 2012-03-08 03:02:55 +0000
2012-03-08T03:02:55+00:00 heroku[router]: GET myapp.com/profiles/1/profile_about dyno=web.1 queue=0 wait=0ms service=14ms status=406 bytes=1
2012-03-08T03:02:55+00:00 app[web.1]: Processing by ProfilesController#profile_about as JS
2012-03-08T03:02:55+00:00 app[web.1]: Parameters: {"id"=>"1"}
2012-03-08T03:02:55+00:00 app[web.1]: Completed 406 Not Acceptable in 3ms
2012-03-08T03:02:55+00:00 heroku[nginx]: 98.218.231.113 - - [08/Mar/2012:03:02:55 +0000] "GET /profiles/1/profile_about HTTP/1.1" 406 1 "http://myapp.com/profiles/1" "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3" myapp.com
From running tail -f logs/development.log:
Started GET "/profiles/1/profile_about" for 127.0.0.1 at Wed Mar 07 22:35:36 -0500 2012
Processing by ProfilesController#profile_about as JS
Parameters: {"id"=>"1"}
PK and serial sequence (5.4ms) SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"goals_profiles"'::regclass
PK and custom sequence (2.5ms) SELECT attr.attname,
CASE
WHEN split_part(def.adsrc, '''', 2) ~ '.' THEN
substr(split_part(def.adsrc, '''', 2),
strpos(split_part(def.adsrc, '''', 2), '.')+1)
ELSE split_part(def.adsrc, '''', 2)
END
FROM pg_class t
JOIN pg_attribute attr ON (t.oid = attrelid)
JOIN pg_attrdef def ON (adrelid = attrelid AND adnum = attnum)
JOIN pg_constraint cons ON (conrelid = adrelid AND adnum = conkey[1])
WHERE t.oid = '"goals_profiles"'::regclass
AND cons.contype = 'p'
AND def.adsrc ~* 'nextval'
Profile Load (1.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = '1' LIMIT 1
Completed 406 Not Acceptable in 30ms
There's a few bugs in your code, maybe it's just stackoverflow formatting here but the inner quotes should be ' instead of " , like this:
$("#tabs-1").html("<%= escape_javascript(render(:partial => 'profile_about'))%>");
And this line is casuing your error:
format.mobile.js {render :layout => nil}
This is impossible because the request can only have a single mime type. "mobile" or "js", not both. If you are requesting the "profile_about" action from javascript, then you must respond back to it with js. "format.mobile" should only be used to render a "profile_about.mobile" template.
Hopefully that's at least a step in the right direction for you.
Probably don't fully answer your question but I was having the 406 status problem, because I've been deploying my app to Phonegap!
It basically happened because the request type didn't match any of the Rails responders in the action.
it was like:
respond_to do |format|
format.json {
render( json: (#parishes) )
}
end
Since I only used it to responde to JSON I changed and it now works:
render( json:(#parishes) )
A more complete way to deal with this is to figure exactly what responder is being asked for that request, or default to something you know to work
Turns out this was due to a lacking check for an xhr request in the prepare_for_mobile method. I found the answer in another question. So the below prepare_for_mobile method allows the JS to work:
def prepare_for_mobile
session[:mobile_param] = params[:mobile] if params[:mobile]
request.format = :mobile if mobile_device? && !request.xhr?
end
If I click destroy on any record for my 3 models models, the user gets logged out. I'm using Devise and Ominauth.
#This logs out a user
def destroy
#rating = Rating.find(params[:id])
#rating.destroy
end
Started POST "/ratings/29" for 192.168.1.103 at 2011-02-26 20:11:45 +0000
Processing by RatingsController#destroy as HTML
Parameters: {"id"=>"29"}
User Load (0.5ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1
Rating Load (0.3ms) SELECT `ratings`.* FROM `ratings` WHERE `ratings`.`id` = 29 LIMIT 1
SQL (0.0ms) BEGIN
AREL (0.5ms) DELETE FROM `ratings` WHERE `ratings`.`id` = 29
SQL (2.7ms) COMMIT
Request
Parameters:
None
Show session dump
session_id: "16a92c418fdfa8966b60b09e76346443"
Show env dump
GATEWAY_INTERFACE: "CGI/1.1"
HTTP_ACCEPT: "application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
HTTP_ACCEPT_CHARSET: "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
HTTP_ACCEPT_ENCODING: "gzip,deflate,sdch"
HTTP_ACCEPT_LANGUAGE: "en-US,en;q=0.8"
HTTP_CACHE_CONTROL: "max-age=0"
HTTP_CONNECTION: "keep-alive"
HTTP_COOKIE: "_traitly_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMTk5NDExYjNjMWMzY2U1NWIwZDNjYjg2Y2FiMGNiNzY%3D--4c140502f8a075f61742fdf11e6fc7100722ca14"
HTTP_HOST: "192.168.1.105:3000"
HTTP_IF_NONE_MATCH: "\"2d7f4ba60c47e0cf39f1361e2274fa89\""
HTTP_REFERER: "http://192.168.1.105:3000/subjects"
HTTP_USER_AGENT: "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.82 Safari/534.16"
HTTP_VERSION: "HTTP/1.1"
PATH_INFO: "/subjects"
QUERY_STRING: ""
REMOTE_ADDR: "192.168.1.103"
REMOTE_HOST: "192.168.1.103"
REQUEST_METHOD: "GET"
REQUEST_PATH: "/"
REQUEST_URI: "http://192.168.1.105:3000/subjects"
SCRIPT_NAME: ""
SERVER_NAME: "192.168.1.105"
SERVER_PORT: "3000"
SERVER_PROTOCOL: "HTTP/1.1"
SERVER_SOFTWARE: "WEBrick/1.3.1 (Ruby/1.9.2/2010-12-25)"
action_controller.instance: #<SubjectsController:0x90ecc1c #action_has_layout=true, #view_context_class=nil, #_headers={"Content-Type"=>"text/html"}, #_status=200, #_response=#<ActionDispatch::Response:0x90ecb68 ......Too long - had to cut it off
action_dispatch.cookies: {"_traitly_session"=>"BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMTk5NDExYjNjMWMzY2U1NWIwZDNjYjg2Y2FiMGNiNzY=--4c140502f8a075f61742fdf11e6fc7100722ca14"}
action_dispatch.parameter_filter: [:password, :password, :password_confirmation]
action_dispatch.remote_ip: 192.168.1.103
action_dispatch.request.content_type: nil
action_dispatch.request.formats: [text/html]
action_dispatch.request.parameters: {"action"=>"index", "controller"=>"subjects"}
action_dispatch.request.path_parameters: {:action=>"index", :controller=>"subjects"}
action_dispatch.request.query_parameters: {}
action_dispatch.request.request_parameters: {}
action_dispatch.request.unsigned_session_cookie: {"session_id"=>"199411b3c1c3ce55b0d3cb86cab0cb76"}
action_dispatch.secret_token: "b3dc65e5cc9d1af31fb06160a604132f5a1f4d13edc313d74cb1bfd7e63994d429f6e8032669ea26ff4a8dab66b79f6070f8449b4a422a7862bb4307a4d84416"
rack.errors: #<IO:<STDERR>>
rack.input: #<StringIO:0x913578c>
rack.multiprocess: false
rack.multithread: false
rack.request.cookie_hash: {"_traitly_session"=>"BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMTk5NDExYjNjMWMzY2U1NWIwZDNjYjg2Y2FiMGNiNzY=--4c140502f8a075f61742fdf11e6fc7100722ca14"}
rack.request.cookie_string: "_traitly_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMTk5NDExYjNjMWMzY2U1NWIwZDNjYjg2Y2FiMGNiNzY%3D--4c140502f8a075f61742fdf11e6fc7100722ca14"
rack.request.query_hash: {}
rack.request.query_string: ""
rack.run_once: false
rack.session: {"session_id"=>"199411b3c1c3ce55b0d3cb86cab0cb76"}
rack.session.options: {:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :id=>"199411b3c1c3ce55b0d3cb86cab0cb76"}
rack.url_scheme: "http"
rack.version: [1, 1]
warden: #<Warden::Proxy:0x9133bf8 #winning_strategies={}, #users={:user=>nil}, #env={"GATEWAY_INTERFACE"=>"CGI/1.1", "PATH_INFO"=>"/subjects", "QUERY_STRING"=>"", "REMOTE_ADDR"=>"192.168.1.103", "REMOTE_HOST"=>"192.168.1.103", "REQUEST_METHOD"=>"GET", "REQUEST_URI"=>"http://192.168.1.105:3000/subjects", "SCRIPT_NAME"=>"", "SERVER_NAME"=>"192.168.1.105", "SERVER_PORT"=>"3000", "SERVER_PROTOCOL"=>"HTTP/1.1", "SERVER_SOFTWARE"=>"WEBrick/1.3.1 (Ruby/1.9.2/2010-12-25)", "HTTP_HOST"=>"192.168.1.105:3000", "HTTP_CONNECTION"=>"keep-alive", "HTTP_REFERER"=>"http://192.168.1.105:3000/subjects", "HTTP_CACHE_CONTROL"=>"max-age=0", "HTTP_USER_AGENT"=>"Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.82 Safari/534.16", "HTTP_ACCEPT"=>"application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5", "HTTP_ACCEPT_ENCODING"=>"gzip,deflate,sdch", "HTTP_ACCEPT_LANGUAGE"=>"en-US,en;q=0.8", "HTTP_ACCEPT_CHARSET"=>"ISO-8859-1,utf-8;q=0.7,*;q=0.3", "HTTP_COOKIE"=>"_traitly_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMTk5NDExYjNjMWMzY2U1NWIwZDNjYjg2Y2FiMGNiNzY%3D--4c140502f8a075f61742fdf11e6fc7100722ca14", "HTTP_IF_NONE_MATCH"=>"\"2d7f4ba60c47e0cf39f1361e2274fa89\"", "rack.version"=>[1, 1], "rack.input"=>#<StringIO:0x913578c>, "rack.errors"=>#<IO:<STDERR>>, "rack.multithread"=>false, "rack.multiprocess"=>false, "rack.run_once"=>false, "rack.url_scheme"=>"http", "HTTP_VERSION"=>"HTTP/1.1", "REQUEST_PATH"=>"/", "action_dispatch.parameter_filter"=>[:password, :password, :password_confirmation], "action_dispatch.secret_token"=>"b3dc65e5cc9d1af31fb06160a604132f5a1f4d13edc313d74cb1bfd7e63994d429f6e8032669ea26ff4a8dab66b79f6070f8449b4a422a7862bb4307a4d84416", "action_dispatch.remote_ip"=>192.168.1.103, "rack.session"=>{"session_id"=>"199411b3c1c3ce55b0d3cb86cab0cb76"}, "rack.session.options"=>{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :id=>"199411b3c1c3ce55b0d3cb86cab0cb76"}, "rack.request.cookie_string"=>"_traitly_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMTk5NDExYjNjMWMzY2U1NWIwZDNjYjg2Y2FiMGNiNzY%3D--4c140502f8a075f61742fdf11e6fc7100722ca14", "rack.request.cookie_hash"=>{"_traitly_session"=>"BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMTk5NDExYjNjMWMzY2U1NWIwZDNjYjg2Y2FiMGNiNzY=--4c140502f8a075f61742fdf11e6fc7100722ca14"}, "action_dispatch.cookies"=>{"_traitly_session"=>"BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMTk5NDExYjNjMWMzY2U1NWIwZDNjYjg2Y2FiMGNiNzY=--4c140502f8a075f61742fdf11e6fc7100722ca14"}, "action_dispatch.request.unsigned_session_cookie"=>{"session_id"=>"199411b3c1c3ce55b0d3cb86cab0cb76"}, "warden"=>#<Warden::Proxy:0x9133bf8 ...>, "action_dispatch.request.path_parameters"=>{:action=>"index", :controller=>"subjects"}, "action_controller.instance"=>#<SubjectsController:0x90ecc1c #action_has_layout=true, #view_context_class=nil, #_headers={"Content-Type"=>"text/html"}, #_status=200, #_response=#<ActionDispatch::Response:0x90ecb68 #writer=#<Proc:0x90ecaf0#/usr/local/rvm/gems/ruby-1.9.2-p136#traitly/gems/actionpack-3.0.4/lib/action_dispatch/http/response.rb:43 (lambda)>, #block=nil, #length=0, #header={}, #status=200, #body=[], #cookie=[], #sending_file=false, #blank=false, #cache_control={}, #etag=nil, #request=#<ActionDispatch::Request:0x90ecb7c #env={...}, #fullpath="/subjects", #request_method="GET", #filtered_parameters={"action"=>"index", "controller"=>"subjects"}, #method="GET">>, #_request=#<ActionDispatch::Request:0x90ecb7c #env={...}, #fullpath="/subjects", #request_method="GET", #filtered_parameters={"action"=>"index", "controller"=>"subjects"}, #method="GET">, #_env={...}, #lookup_context=#<ActionView::LookupContext:0x90ec4c4 #details_key=nil, #details={:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]}, #skip_default_locale=false, #frozen_formats=false, #view_paths=[/root/projects/traitly/app/views, /usr/local/rvm/gems/ruby-1.9.2-p136#traitly/gems/devise-1.1.7/app/views]>, #_action_name="index", #_response_body=nil, #_config={}, #current_user=nil>, "action_dispatch.request.content_type"=>nil, "action_dispatch.request.request_parameters"=>{}, "rack.request.query_string"=>"", "rack.request.query_hash"=>{}, "action_dispatch.request.query_parameters"=>{}, "action_dispatch.request.parameters"=>{"action"=>"index", "controller"=>"subjects"}, "action_dispatch.request.formats"=>[t
You're using Rails 3, which uses JavaScript to issue delete requests. Because the request isn't set up properly, your log is showing Started POST instead of the correct Started DELETE.
The request will also not include the required CSRF data, and as of Rails 3.0.4 the session is silently reset instead of throwing an ActionController::InvalidAuthenticityToken error. This is why you suspect the authentication issue lies with Devise, but it is actually being triggered within Rails itself.
To fix this include the following in your layout:
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
Also ensure you have an updated rails.js (which contains the JavaScript code used for delete requests). The Rails 3.0.4 upgrade notes explain the issue in more detail.
If you're using the jquery rails.js replacement, you can get the updated version from here.