In this case, you‘re in luck. ruby-lang.org’s ftp server is also accessible over http:
source "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-#{version}.tar.gz"
should work.
It seems like it won’t be long until the remote_file resource supports FTP: http://tickets.opscode.com/browse/CHEF-1031In the meantime, if you can get the file from HTTP as Michael said, that will solve your problem.- cassianoOn Friday, July 5, 2013 at 20:04, Michael Herman wrote:
Hi David,It looks like you are providing an FTP resource, and it is expectingan HTTP server.Rgds,mghOn Sat, Jul 6, 2013 at 8:48 AM, David Montgomery< " target="_blank"> > wrote:HiI am trying to upgrade ruby use chef-solo yet I get the below error. Theftp file exists yet chef bombs. Why?version = "1.9.3-p392"remote_file "#{Chef::Config[:file_cache_path]}/ruby-#{version}.tar.gz" doaction :create_if_missingend================================================================================Error executing action `create_if_missing` on resource'remote_file[/tmp/ruby-1.9.3-p392.tar.gz]'================================================================================Net::HTTPBadResponse--------------------wrong status line: "220 (vsFTPd 2.0.5)"Resource Declaration:---------------------# In/home/ubuntu/workspace/druidry-chef/chef-solo/cookbooks/ruby/recipes/default.rb62: remote_file "/tmp/ruby-#{version}.tar.gz" do64: action :create_if_missing65: end66:Compiled Resource:------------------# Declared in/home/ubuntu/workspace/druidry-chef/chef-solo/cookbooks/ruby/recipes/default.rb:62:in`from_file'remote_file("/tmp/ruby-1.9.3-p392.tar.gz") doprovider Chef::Provider::RemoteFileaction [:create_if_missing]retries 0retry_delay 2path "/tmp/ruby-1.9.3-p392.tar.gz"backup 5cookbook_name :rubyrecipe_name "default"end[2013-07-06T06:42:35+08:00] ERROR: Running exception handlers[2013-07-06T06:42:35+08:00] ERROR: Exception handlers completeChef Client failed. 10 resources updated[2013-07-06T06:42:35+08:00] FATAL: Stacktrace dumped to/home/ubuntu/workspace/druidry-chef/chef-solo/chef-stacktrace.out[2013-07-06T06:42:35+08:00] FATAL: Net::HTTPBadResponse:remote_file[/tmp/ruby-1.9.3-p392.tar.gz] (ruby::default line 62) had anerror: Net::HTTPBadResponse: wrong status line: "220 (vsFTPd 2.0.5)"
Archive powered by MHonArc 2.6.16.