I installed the Ruby Hosting Package and Sinatra on Windows Server 2008R2 with IIS using Helicon Zoo.
I downloaded and imported the Sinatra template from Helicon Zoo Templates using web deploy on IIS
Now I get this error when navigating to the website:
[tid-7800168] paths need to start with / (ArgumentError)
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:30:in `block in remap'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:22:in `each'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:22:in `map'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:22:in `remap'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:18:in `initialize'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:142:in `new'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:142:in `generate_map'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:128:in `to_app'
C:/Zoo/Workers/ruby/lib/app.rb:45:in `build_app'
C:/Zoo/Workers/ruby/lib/app.rb:16:in `initialize'
C:/Zoo/Workers/ruby/lib/worker.rb:4:in `new'
C:/Zoo/Workers/ruby/lib/worker.rb:4:in `initialize'
C:/Zoo/Workers/ruby/zoorack.rb:30:in `new'
C:/Zoo/Workers/ruby/zoorack.rb:30:in `<module:Zack>'
C:/Zoo/Workers/ruby/zoorack.rb:12:in `<main>'
Any Ideas?
Please upgrade Helicon Zoo Module from the feed to the version 1.0.0.47. Just go to Zoo -> Modules and install it again.
Neil,
I posted a similar question just a couple of days ago, here.
As you can see from Yaroslav's reply, an updated version of Helicon Zoo module may help your case.
I think it is something to do with IIS Express installation in my case (I couldn't install it successfully through the web platform installer and had to go directly to download it from the MS site + when I run the ruby web server it works). I don't think my issue will help you, but maybe the Helicon update might?
Related
I am new to Jekyll and I am trying to build a blog using static pages with Octopress.
rake is generating the site correctly without any errors but when I try to preview the site, depsite that the server starts without any error
>>> Compass is polling for changes. Press Ctrl-C to Stop.
[2014-02-23 15:23:50] INFO WEBrick 1.3.1
[2014-02-23 15:23:50] INFO ruby 2.0.0 (2013-11-22) [x64-mingw32]
[2014-02-23 15:23:50] INFO WEBrick::HTTPServer#start: pid=1996 port=4000
It will throw errors when I try to access localhost:4000 from my web browser and will not serve the files
127.0.0.1 - - [23/Feb/2014 15:25:25] "GET / HTTP/1.1" 200 - 0.0500
[2014-02-23 15:25:25] ERROR Errno::ECONNRESET: An existing connection was forcibly closed by the remote host.
c:/Ruby/lib/ruby/2.0.0/webrick/httpserver.rb:80:in `eof?'
c:/Ruby/lib/ruby/2.0.0/webrick/httpserver.rb:80:in `run'
c:/Ruby/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
I am running Windows 8.1 and I have been trying rake preview with both Ruby 1.9.3 and 2.0 and also both x86 and x64 architectures on different machines. Also I tried to disable my firewall but it did not fix the issue.
I'd really appreciate some help to solve this issue.
Thanks.
After some googling, it looks like this may be a WEBrick specific error with Windows and IE (you didn't list the browser(s) you tried, but most results also list IE as a culprit). I would try:
Hitting http://localhost:4000 from Firefox/Chrome and see if the error persists
Changing your default web server from WEBrick to something else (I'd recommend the Ruby Thin Server). An easy walkthrough specifically for Octopress and the Thin server can be found at this blog post.
From Octopress documentation, it is recommended that you use Ruby 1.9.3. You can easily get Ruby 1.9.3 and other useful tools for Windows system by installing railsInstaller.
I'm interested in setting up a web based speech recognition service for testing purposes. I did some research and found Ruby PocketSphinx Server. They claim to accept input as an audio file and return a JSON file with the text from the audio input. This is exactly what I need.
The problem is I'm new to Ruby and Sphinx/PocketSphinx. Even though I followed the documentation to setup the environment, I'm still completely lost. I got as far as running this command unicorn -c unicorn.conf.rb config.ru but got this error:
/usr/lib/ruby/vendor_ruby/unicorn/configurator.rb:74:in `read': No
such file or directory - unicorn.conf.rb (Errno::ENOENT) from
/usr/lib/ruby/vendor_ruby/unicorn/configurator.rb:74:in `reload' from
/usr/lib/ruby/vendor_ruby/unicorn/configurator.rb:67:in `initialize'
from /usr/lib/ruby/vendor_ruby/unicorn/http_server.rb:104:in `new'
from /usr/lib/ruby/vendor_ruby/unicorn/http_server.rb:104:in
`initialize' from /usr/bin/unicorn:121:in `new' from
/usr/bin/unicorn:121:in `<main>'
In the root directory of the ruby-pocketsphinx-server folder there should be a file called unicorn.conf.rb.
You should be running the unicorn -c unicorn.conf.rb config.ru command in the root directory.
I wanted to switch my main blog to Octopress earlier today and so, I cloned Octopress, configured it and deployed it in Heroku.
Then I searched the net on how to import my old blogger posts into Octopress and found this script as the answer to it:
https://gist.github.com/1578928
I have the exported blog.xml file with me. When I run the script in the gist, I get the following error. I've just started with Ruby and I don't know much about it. I would be glad if anyone could help me with this. The error seems completely new and I couldn't find any answers to this from my searches so far.
import.rb:33:in `add': dunno ide (RuntimeError)
from import.rb:158:in `block in <main>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.2-x86-mingw32/lib/nokogiri/xml/node_set.rb:239:in `block in each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.2-x86-mingw32/lib/nokogiri/xml/node_set.rb:238:in `upto'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.2-x86-mingw32/lib/nokogiri/xml/node_set.rb:238:in `each'
from import.rb:157:in `<main>'
Looking at the script in the Gist you linked, the problem is that it can only parse 'post' and 'comment' types, while you seem to have another one called 'ide'.
You should double check if the output XML is all right and doesn't have strangely named tags.
This app works just fine on my local computer. After pushing it to Heroku, static pages appear to be working but the blog section throws an Internal Server Error. I pulled the logs by running "heroku logs" and this is what I get:
==> production.log <==
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
/home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in `start'
/home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/server.rb:156:in `start'
/home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/controllers/controller.rb:80:in `start'
/home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/runner.rb:177:in `send'
/home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/runner.rb:177:in `run_command'
/home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/lib/thin/runner.rb:143:in `run!'
/home/slugs/215194_e5b887e_c999/mnt/.bundle/gems/gems/thin-1.2.7/bin/thin:6
Something wrong with the eventmachine gem, I suppose....but it works fine on my machine. So I'm not sure what's going on or how to debug it.
From your error log, it looks like you are somehow trying to access a database with SQLite3. Heroku's uses Postgresql though, so clearly your database will fail to open. Heroku generates automatically the database.yml file, so the error is can't be there but maybe you are requiring and using sqlite3 directly?
I'm not sure how heroku handles things, but the trace/logs seem to say you might not have migrated your database. Is this the case?
Try updating the heroku gem. Worked for me.
I'm downloading files from a HTTPS website. I've narrowed the problem down to this:
>> require 'open-uri'
>> open('https://www.gmail.com/') # just as an example
C:/Ruby/lib/ruby/1.8/net/http.rb:586:in `connect': certificate verify failed (OpenSSL::SSL::SSLError)
from C:/Ruby/lib/ruby/1.8/net/http.rb:586:in `connect'
from C:/Ruby/lib/ruby/1.8/net/http.rb:553:in `do_start'
from C:/Ruby/lib/ruby/1.8/net/http.rb:542:in `start'
from C:/Ruby/lib/ruby/1.8/open-uri.rb:242:in `open_http'
from C:/Ruby/lib/ruby/1.8/open-uri.rb:616:in `buffer_open'
from C:/Ruby/lib/ruby/1.8/open-uri.rb:164:in `open_loop'
from C:/Ruby/lib/ruby/1.8/open-uri.rb:162:in `catch'
from C:/Ruby/lib/ruby/1.8/open-uri.rb:162:in `open_loop'
from C:/Ruby/lib/ruby/1.8/open-uri.rb:132:in `open_uri'
from C:/Ruby/lib/ruby/1.8/open-uri.rb:518:in `open'
from C:/Ruby/lib/ruby/1.8/open-uri.rb:30:in `open'
from openuri_sandbox.rb:3
This code works just fine on Mac OS X or Linux, but it just started failing on Windows. I've tested on a few Win XP installations and one Win 7 installation -- they all fail. They're all running Ruby 1.8.6 patchlevel 287. What's going on here? We know we can turn off SSL verification and it works (or at least seems to), but that seems like a poor solution.
I'm interfacing with the website in question using Mechanize, so I'd like to be able to continue to use that.
Update: It looks like the problem with Mechanize might be specific to Windows 7, unlike I previously thought. It worked just a couple of weeks ago, though.
Update 2: This is still happening on Windows (XP and 7), but not on Linux. It's no longer a problem in the important script I needed to make work, though -- still not sure why.
appears it happens because ruby doesn't ship with certificates? http://betterlogic.com/roger/2011/08/github-jruby-ssl-woe/
Could the difference be 32-bit vs 64-bit architecture?
I'm seeking the same solution myself. I resolved this issue on the command line using cURL and the information to set-up a CA-bundle. I'm still looking for a Ruby fix.
This is a common issue across on Linux, Windows, Windows, Mac, Ruby 1.8, Ruby 1.9 and JRuby from my testing/experiments.