Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depend on rails < 4 #9

Open
tampakrap opened this issue Jan 22, 2015 · 0 comments
Open

depend on rails < 4 #9

tampakrap opened this issue Jan 22, 2015 · 0 comments

Comments

@tampakrap
Copy link

studio_api needs to depend on activeresource < 4, one of the following in Gemfile should do it:

gem 'builder', '~> 3.0.0'
gem 'activeresource', '~> 3.2.21'

Otherwise, it tries to connect to https even when only http is used (for Studio Onsite):

irb(main):001:0> require 'studio_api'
=> true

irb(main):004:0> connection = StudioApi::Connection.new('user', 'key', 'http://studioserver/api/v2/user')
=> #<StudioApi::Connection:0x000000030390f0 @user="user", @password="key", @uri=#<URI::HTTP:0x00000003038e98 URL:http://studioserver/api/v2/user>, @proxy=nil, @timeout=45, @ssl={:verify_mode=>0}>

irb(main):007:0> StudioApi::Util.configure_studio_connection connection
=> [StudioApi::Appliance, StudioApi::Build, StudioApi::File, StudioApi::Gallery, StudioApi::Repository, StudioApi::Rpm, StudioApi::RunningBuild, StudioApi::TemplateSet, StudioApi::Testdrive, StudioApi::Appliance::Status, StudioApi::Appliance::Configuration, StudioApi::Appliance::Repository, StudioApi::Appliance::GpgKey, StudioApi::Appliance::Configuration::Firewall, StudioApi::Gallery::Appliance]

irb(main):008:0> templates = StudioApi::TemplateSet.find(:all).find {|s| s.name == "default" }.template
ActiveResource::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol
    from /usr/lib64/ruby/gems/2.1.0/gems/activeresource-4.0.0/lib/active_resource/connection.rb:127:in `rescue in request'
    from /usr/lib64/ruby/gems/2.1.0/gems/activeresource-4.0.0/lib/active_resource/connection.rb:118:in `request'
    from /usr/lib64/ruby/gems/2.1.0/gems/activeresource-4.0.0/lib/active_resource/connection.rb:82:in `block in get'
    from /usr/lib64/ruby/gems/2.1.0/gems/activeresource-4.0.0/lib/active_resource/connection.rb:216:in `with_auth'
    from /usr/lib64/ruby/gems/2.1.0/gems/activeresource-4.0.0/lib/active_resource/connection.rb:82:in `get'
    from /usr/lib64/ruby/gems/2.1.0/gems/activeresource-4.0.0/lib/active_resource/base.rb:966:in `find_every'
    from /usr/lib64/ruby/gems/2.1.0/gems/activeresource-4.0.0/lib/active_resource/base.rb:873:in `find'
    from (irb):8
    from /usr/bin/irb:11:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant