-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 Errors when creating messages #16
Comments
Hey, I pushed a fix, we were overriding the element_name in Resource ignoring the "special" element name setting necessary in Basecamp::Message to use "post" in the API calls instead of "message". The problem was only in rails >= 3, that method was ignored in rails < 3. Can you try the fix by adding the gem like this in your project? gem "basecamp", :git => "git://github.com/anibalcucco/basecamp-wrapper.git", :ref => "7e67411a847c9bf921e3c8fe489110fbc0dfa53e" If you confirm it's working, i'll bump the gem version. Thanks, |
Hi Anibal -- That worked! I added the gem into my gem file and the message posted to the project. Yes it was Rails 3.2.0 Thanks so much! Ben Ben Unsworth
On 2012-01-26, at 7:37 PM, Anibal Cucco wrote: Hey, I pushed a fix, we were overriding the element_name in Resource ignoring the "special" element name setting necessary in Basecamp::Message to use "post" in the API calls instead of "message". The problem was only in rails >= 3, that method was ignored in rails < 3. Can you try the fix by adding the gem like this in your project? gem "basecamp", :git => "git://github.com/anibalcucco/basecamp-wrapper.git", :ref => "7e67411a847c9bf921e3c8fe489110fbc0dfa53e" If you confirm it's working, i'll bump the gem version. Thanks, Reply to this email directly or view it on GitHub: |
Thanks @bunswo. Version bumped to 0.0.9 and published to rubygems. |
Awesome - While I have you here and before I go too deep -- does your wrapper allow for adding multiple people to a message? Ben Unsworth
On 2012-01-26, at 10:05 PM, Anibal Cucco wrote: Thanks @bunswo. Version bumped to 0.0.9 and published to rubygems. Reply to this email directly or view it on GitHub: |
There's currently no way to do that using the REST API because the
But you can always use the non REST API for those special cases:
Note: I discovered a bug for that type of calls and i pushed a fix. So, if you want to use that, you have to reference this commit on your Gemfile: 43a72a2 |
Great. Thanks Anibal. That's really helpful. Sent from my iPhone On 2012-01-27, at 3:14 PM, "Anibal Cucco" reply@reply.github.com wrote:
|
I'm getting 404 errors when trying to create Basecamp messages using the wrapper.
I can create Projects successfully:
p = Basecamp::Project.new()
p.name = 'My Test Project'
p.save
The project shows up in Basecamp on the web without problem.
And I can grab the new project id:
proj_id = p.id
But when I try to create messages on the project...
m = Basecamp::Message.new(:project_id => proj_id)
m.title = 'Message in a bottle'
m.body = 'Another lonely day, with no one here but me'
m.save
It returns a 404 error after the save method:
ActiveResource::ResourceNotFound: Failed. Response code = 404. Response message = Not Found.
from /Users/benunsworth/.rvm/gems/ruby-1.9.3-p0/gems/activeresource-3.2.0/lib/active_resource/connection.rb:136:in `handle_response' ...
Any idea?
Thanks,
Ben
The text was updated successfully, but these errors were encountered: