No such file to load -- net/https


#1

Hi,

Came across the substruct project and decided to download and play with
it. Am running rails 1.1.2 with ruby 1.8.4 on Ubuntu.

I start webrick … went to the admin section of the store. Create a
product. Went to the store section and put this product in my cart and
then clicked on checkout. I fill the form and submit it . I click on
the “Finish Order” button and get the following error:

MissingSourceFile in StoreController#finish_order

no such file to load – net/https

RAILS_ROOT: script/…/config/…
Application Trace | Framework Trace | Full Trace

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in
require__' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
require' /usr/lib/ruby/gems/1.8/gems/payment-1.0.1/lib/payment.rb:29 /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:inload’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in
rails_pre_engines_require_or_load' vendor/plugins/engines/lib/engines/dependencies_extensions.rb:52:inrails_1_1_require_or_load’
vendor/plugins/engines/lib/engines/dependencies_extensions.rb:13:in
require_or_load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:independ_on’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
require_dependency' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:inconst_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:inconst_missing’
#{RAILS_ROOT}/vendor/plugins/substruct/app/models/order.rb:360:in
create_transaction' #{RAILS_ROOT}/vendor/plugins/substruct/app/models/order.rb:396:inget_auth_transaction’
#{RAILS_ROOT}/vendor/plugins/substruct/app/controllers/store_controller.rb:236:in
finish_order' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:inperform_action_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in
perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in
perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:inprocess_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:inprocess’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:inhandle_dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in
service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:inrequire’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:inrequire’
script/server:3

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in
require__' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
require' /usr/lib/ruby/gems/1.8/gems/payment-1.0.1/lib/payment.rb:29 /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:inload’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in
rails_pre_engines_require_or_load' vendor/plugins/engines/lib/engines/dependencies_extensions.rb:52:inrails_1_1_require_or_load’
vendor/plugins/engines/lib/engines/dependencies_extensions.rb:13:in
require_or_load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:independ_on’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
require_dependency' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:inconst_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:inconst_missing’
#{RAILS_ROOT}/vendor/plugins/substruct/app/models/order.rb:360:in
create_transaction' #{RAILS_ROOT}/vendor/plugins/substruct/app/models/order.rb:396:inget_auth_transaction’
#{RAILS_ROOT}/vendor/plugins/substruct/app/controllers/store_controller.rb:236:in
finish_order' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:inperform_action_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in
perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in
perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:inprocess_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:inprocess’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:inhandle_dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in
service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:inrequire’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:inrequire’
script/server:3

This error occured while loading the following files:
payment.rb
net/https

Request

Parameters: {“commit”=>“Finish Order”}

Show session dump


:last_order_list_view: All
:return_to:
:order_id: 4
:cart: !ruby/object:Cart
items:

  • &id001 !ruby/object:OrderLineItem
    attributes:
    order_id: 4
    product_id: 2
    quantity: 1
    id: 4
    unit_price: 20.0
    errors: !ruby/object:ActiveRecord::Errors
    base: *id001
    errors: {}

    new_record: false
    product: !ruby/object:Product
    attributes:
    name: Funny Beads
    size_width: “0”
    weight: “0”
    date_available: 2006-04-29 00:00:00
    price: “20”
    code: XY20
    quantity: “0”
    size_height: “0”
    id: “2”
    description: |-
    This product has funny beads. You should buy it today

      Isnt this somewhat cool!
    size_depth: "0"
    

total: 20.0
:last_content_list_view: Page
:user: !ruby/object:User
attributes:
id: “1”
login: admin
password: 652b1b54a914207f0cfd15de1967d8ebe26c1b94
flash: !map:ActionController::Flash::FlashHash {}

Response
Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}

I am fairly new to Ruby and am trying to figure out what I have to
configure to get this “no such file to load – net/https” error
resolved?

(Am running all this on Ubuntu)

-Thank you


#2

Turns out that I needed to install libopenssl-ruby.

-Thanks.