plamoni / SiriProxy

A (tampering) proxy server for Apple's Siri
GNU General Public License v3.0
2.12k stars 343 forks source link

Adding other dependency fails #517

Closed Dageek4590 closed 11 years ago

Dageek4590 commented 11 years ago

Ok i am running 0.5.4.

I have made a new project. basically a copy of the example. Stripped out all the commands and added one of my own. It runs fine.

Now my end project will need httparty and json. So in the rb file i add require "httparty" and require "json"

I also go to the project gemspec file and add s.add_runtime_dependency "httparty" and one for json also.

When I bundle, then run the server, then say the one command that was working, siri gets my command but acts like it has no answer so it forwards on to a regular siri response. If I remove the requires for httparty and json then the project works again.

I have also run gem install httparty and gem install json.

Nothing works. If I require those 2 things my project will not respond. There is no error in the server. Just says AddViews and then responds as siri would if I had no proxy. Remove the requires and it answers my command.

Sorry if this isnt an issue and more of a question! Thanks!

elvisimprsntr commented 11 years ago

Try using one of my plugins as an example how to add plugins.

https://github.com/elvisimprsntr?tab=repositories

Elvis

On Apr 26, 2013, at 17:54, Dageek4590 notifications@github.com wrote:

Ok i am running 0.5.4.

I have made a new project. basically a copy of the example. Stripped out all the commands and added one of my own. It runs fine.

Now my end project will need httparty and json. So in the rb file i add require "httparty" and require "json"

I also go to the project gemspec file and add s.add_runtime_dependency "httparty" and one for json also.

When I bundle, then run the server, then say the one command that was working, siri gets my command but acts like it has no answer so it forwards on to a regular siri response. If I remove the requires for httparty and json then the project works again.

I have also run gem install httparty and gem install json.

Nothing works. If I require those 2 things my project will not respond. There is no error in the server. Just says AddViews and then responds as siri would if I had no proxy. Remove the requires and it answers my command.

Sorry if this isnt an issue and more of a question! Thanks!

— Reply to this email directly or view it on GitHub.

Dageek4590 commented 11 years ago

Ok walking through a few of your projects helped. I have it working with json and httparty. Now I just get a fail when I try to require net/http.

Console window says : Could not find gem 'net/http' (>= 0) ruby' which is required by gem by 'siriproxy-mytest (>= 0) in any of the sources

As I am begining ruby my guess is I have to install net/http. That is most likely the problem. Not sure but if that is it could you explain how. Thanks!

elvisimprsntr commented 11 years ago

glad you have it working.

for gems that are not part of base rubygems, the correct method is to specify the runtime dependency in the gem spec which will install the gem when a user of your plugin performs a siriproxy bundle. The other option is to manually install using gem install {gem name}. In both cases you also need to specify the require option in your ruby code.

The >=0 error message is known to appear when launching siriproxy. it does not necessarily mean the gem in not installed.

Dageek4590 commented 11 years ago

I appreciate the answer but when requiring net/http the server wont even start. Guess I'll just keep scouring google!