I've created simple ROR app on Heroku's server and I want to add product using RUBY's script:
require 'rubygems' require 'rest_client'
RestClient.post 'http://falling-ice-5948.herokuapp.com/products/new', :title => 'TESTTESTTEST', :description => "MYTESTTESTTESTTEST", :image_url => "TESTTESTNULL.jpg", :price => 4.50
There's my page:
When I run my script it gives me an error:
ruby postEasy.rb /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in
return!': 404 Resource Not Found (RestClient::ResourceNotFound) from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in
process_result' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:178:intransmit' from /usr/lib/ruby/1.8/net/http.rb:543:in
start' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:172:intransmit' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in
execute' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:33:inexecute' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient.rb:72:in
post' from postEasy.rb:4
Any ideas?
Thanks in advance
$ heroku console
. – tbuehlmann