Search Results

Search found 2 results on 1 pages for 'webren'.

Page 1/1 | 1 

  • Ruby's autoload not working in 1.8.7 or Ruby Enterprise?

    - by webren
    I've written a gem and within a file I am doing this to autoload my main gem logic: $:.push File.expand_path('lib', __FILE__) require "oa-casport/version" require 'omniauth/core' module OmniAuth module Strategies autoload :Casport, 'omniauth/strategies/casport' end end For Ruby versions 1.8.7 and ree, it prints out "no such file to load - omniauth/strategies/casport' But it doesn't print out this message on version 1.9.2. Is there something off with the location of calling autoload? The repo for the gem is located at https://github.com/stevenhaddox/oa-casport

    Read the article

  • Java URL Connection Time Out

    - by webren
    Hello, I am attempting to connect to a website where I'd like to extract its HTML contents. My application will never connect to the site - only time out. Here is my code: URL url = new URL("www.website.com"); URLConnection connection = url.openConnection(); connection.setConnectTimeout(2000); connection.setReadTimeOut(2000); BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()); String line; while ((line = reader.readLine()) != null) { // do stuff with line } reader.close(); Any ideas would be greatly appreciated. Thanks!

    Read the article

1