Jake Smith
Jake Smith

Reputation: 2823

How can I test my external API calls without having to push my code changes to my Ruby on Rails application?

Question Rephrase:

Can I configure my local web server to be connected to the public internet so that I can test my API calls locally?

Details: (edited)

I'm still looking for some help on this. It seems that there is a compatibility issue from what I can gather from many Google searches. Has anyone out there used the gem Proxylocal on a Windows machine? Did you need to perform any extra steps to get it to work because you were on a Windows machine?

I am using Ruby on Rails and Heroku for deployment.

I was pointed to Pow (pow.cx), but this only works on macs. I am running Windows 8. Does anyone have a suggestion for me? Thanks!

Update:

I was unable to install the proxylocal gem. I receive the following error upon entering gem install proxylocal in my command line prompt:

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing proxylocal:
        ERROR: Failed to build gem native extension.

    C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile

make
generating decode-i386-mingw32.def
compiling decode.c
decode.c:3:24: fatal error: netinet/in.h: No such file or directory
compilation terminated.
make: *** [decode.o] Error 1


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bert-1.1.6 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bert-1.1.6/ext/bert/c/gem_make.out

And this is the contents of gem_make.out:

C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile

make
generating decode-i386-mingw32.def
compiling decode.c
decode.c:3:24: fatal error: netinet/in.h: No such file or directory
compilation terminated.
make: *** [decode.o] Error 1

Does anyone have an idea of what might be the issue here? I don't see any spaces in the paths I have my gems installed in, which seems to be a common cause to this error for a lot of people...

Upvotes: 2

Views: 588

Answers (2)

Siddharth Kumar
Siddharth Kumar

Reputation: 1715

I was facing the same issue, but I found that, it's not proxylocal's problem, it's bert's problem, see the error log:

Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bert-1.1.6 for inspection.

It's because with bert distribution, linux headers are being provided, I have posted here a solution for the same after testing it on my windows system. Please have a look and let me know, it you were able to solve it or not!

Upvotes: 1

andreofthecape
andreofthecape

Reputation: 1196

You can try the proxylocal gem

Upvotes: 2

Related Questions