[rt-users] rt-client ruby gem - getting started

Jim Brandt jbrandt at bestpractical.com
Mon May 6 08:08:04 EDT 2013


What is it you are trying to do that isn't working? Looking at the 
methods available, it seems they mirror the RT CLI methods:

http://rt-client.rubyforge.org/

So if you want to show a ticket like your example, it seems you would 
call rt.show and pass the ticket id.

On 5/4/13 1:33 PM, Peter Roosakos wrote:
> I'm playing around with the rt-client ruby gem, and running into some
> difficulty.  After adding to my rails app and creating a .rtclientrc
> file in my project directory, I can successfully access the objects and
> methods in the console using RT_Client.new.
>
> rt = RT_Client.new
>
> rt.user
> => peter
>
> returns my user name, so it's successfully accessing the configuration
> options in my config file.
>
> rt.status
> => "RT/3.8.7 200 Ok\n\n# Invalid object specification:
> 'index.html'\n\nid: index.html\n\n"
>
> it appears that credentials aren't being passed?
>
> rt.cookie
> returns the contents of the cookie file, which is being created and can
> be found in the correct specified directory as per the .rtclientrc file.
>
> rt.server
> => https://myserverdomain.com/rt/
>
> and going directly to
>
> https://myserverdomain.com/rt/REST.1.0/ticket/1/show?user=username&pass=password
>
>
> Using the same username and password successfully displays the first
> ticket, so my credentials are correct
>
> I'm on Ruby 1.9.3-p286
>
> Any thoughts on what I might be missing?  Using the latest gem, 0.4.1
>
>

-- 




More information about the rt-users mailing list