Giter VIP home page Giter VIP logo

Comments (12)

tvaughan avatar tvaughan commented on July 22, 2024

On Tue, Jan 15, 2013 at 5:34 AM, Michael Lajlev [email protected]:

I've followed to guide strictly and check with various ftp connections.

activate :deploy do |deploy|
deploy.method = :ftp
deploy.host = "ftp.servage.net"
deploy.user = "trustpilot"
deploy.password = "mypassword"
deploy.path = "/www"
end
´´´

The error I get in my terminal

~/Sit.../trustpilot/www http://www $ middleman deploy
Deploying via ftp to [email protected]:/

/Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/middleman-deploy-0.0.9/lib/middleman-deploy/commands.rb:179:in
chdir': No such file or directory - build/ (Errno::ENOENT)

The problem seems to be that build/ does not exist. Did you run
middleman build before your ran middleman deploy?

Thanks.

-Tom

from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328
/gems/middleman-deploy-0.0.9/lib/middleman-deploy/commands.rb:179:in
deploy_ftp'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/middleman-deploy-0.0.9/lib/middleman-deploy/commands.rb:31:in
deploy'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328
/gems/thor-0.15.4/lib/thor/task.rb:27:inrun'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/invocation.rb:120:in
invoke_task'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328
/gems/thor-0.15.4/lib/thor.rb:275:indispatch'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/base.rb:425:in
start'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328
/gems/middleman-core-3.0.9/lib/middleman-core/cli.rb:77:inmethod_missing'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/task.rb:29:in
run'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328
/gems/thor-0.15.4/lib/thor/task.rb:126:inrun'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/invocation.rb:120:in
invoke_task'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328
/gems/thor-0.15.4/lib/thor.rb:275:indispatch'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/base.rb:425:in
start'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328
/gems/middleman-core-3.0.9/lib/middleman-core/cli.rb:22:instart'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/middleman-core-3.0.9/bin/middleman:18:in
<top (required)>'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/bin/middleman:19:in
load'
from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/bin/middleman:19:in

' from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328 /bin/ruby_noexec_wrapper:14:ineval' from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/bin/ruby_noexec_wrapper:14:in `' ´´´


Reply to this email directly or view it on GitHubhttps://github.com//issues/13.

http://flavors.me/tvaughan

from middleman-deploy.

lajlev avatar lajlev commented on July 22, 2024

Yes I did :(

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

The only way I can reproduce this is if build/ does not exist. Do you specify an alternate build directory in config.rb?

from middleman-deploy.

lajlev avatar lajlev commented on July 22, 2024

Here is my config.rb

require "slim"


###
# Compass
###

# Susy grids in Compass
# First: gem install susy --pre
# require 'susy'

# Change Compass configuration
# compass_config do |config|
#   config.output_style = :compact
# end

###
# Page options, layouts, aliases and proxies
###

# Per-page layout changes:
#
# With no layout
# page "/path/to/file.html", :layout => false
#
# With alternative layout
# page "/path/to/file.html", :layout => :otherlayout
#
# A path which all have the same layout
# with_layout :admin do
#   page "/admin/*"
# end
with_layout :clean do
  page "style-guide*"
end


# Proxy (fake) files
# page "/this-page-has-no-template.html", :proxy => "/template-file.html" do
#   @which_fake_page = "Rendering a fake page with a variable"
# end

###
# Helpers
###

# Automatic image dimensions on image_tag helper
# activate :automatic_image_sizes

# Methods defined in the helpers block are available in templates
# helpers do
#   def some_helper
#     "Helping"
#   end
# end

# Set slim-lang output style
Slim::Engine.set_default_options :pretty => true

# Set template languages
set :slim, :layout_engine => :slim

# Disable error slim msg
Slim::Engine.disable_option_validator!


#set :blog_layout_engine, :slim

# Work with livereload browser extension
activate :livereload

set :build_dir, 'build'

set :css_dir, 'styles'

set :js_dir, 'scripts'

set :images_dir, 'images'


activate :deploy do |deploy|
  deploy.method = :ftp
  deploy.host = "ftp.servage.net"
  deploy.user = "phozzy"
  deploy.password = "secret"
  deploy.path = ""
end

# Build-specific configuration
configure :build do
  # For example, change the Compass output style for deployment
  # activate :minify_css

  # Minify Javascript on build
  # activate :minify_javascript

  # Enable cache buster
  # activate :cache_buster

  # Use relative URLs
  # activate :relative_assets

  # Compress PNGs after build
  # First: gem install middleman-smusher
  # require "middleman-smusher"
  # activate :smusher

  # Or use a different image path
  # set :http_path, "/Content/images/"
end

´´´´

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

Works for me. Are you running middleman deploy from the same directory as where config.rb is located?

from middleman-deploy.

lajlev avatar lajlev commented on July 22, 2024

Yes still gets this error

## Deploying via ftp to [email protected]:
/Users/lajlev/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/ftp.rb:300:in `getresp': 501 Invalid number of arguments (Net::FTPPermError)
    from /Users/lajlev/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/ftp.rb:312:in `voidresp'
    from /Users/lajlev/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/ftp.rb:335:in `block in voidcmd'
    from /Users/lajlev/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
    from /Users/lajlev/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/ftp.rb:333:in `voidcmd'
    from /Users/lajlev/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/ftp.rb:771:in `chdir'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/middleman-deploy-0.0.10/lib/middleman-deploy/commands.rb:182:in `deploy_ftp'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/middleman-deploy-0.0.10/lib/middleman-deploy/commands.rb:31:in `deploy'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/middleman-core-3.0.11/lib/middleman-core/cli.rb:77:in `method_missing'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/task.rb:29:in `run'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/task.rb:126:in `run'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/middleman-core-3.0.11/lib/middleman-core/cli.rb:22:in `start'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/gems/middleman-core-3.0.11/bin/middleman:18:in `<top (required)>'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/bin/middleman:19:in `load'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/bin/middleman:19:in `<main>'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/lajlev/.rvm/gems/ruby-1.9.3-p194@rails328/bin/ruby_noexec_wrapper:14:in `<main>'

´´´´

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

Great. That's a different error. Looks like we've solved the problem of a non-existent build/ directory. Now it seems like, according to the stacktrace, that the problem is with deploy.path = "". lib/middleman-deploy/commands.rb:182 is a call to ftp.chdir. You have to specify a path even if that's just .

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

Can I close this issue? If you set deploy.path to a valid path does that work?

from middleman-deploy.

lajlev avatar lajlev commented on July 22, 2024

I tested it on another FTP server and it worked smoothly, not sure what when wrong :/

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

Great! Thanks for the update.

from middleman-deploy.

barraponto avatar barraponto commented on July 22, 2024

I bumped into this issue, but I was actually misconfiguring the extension: I had forgotten to pass the deploy parameter. So if your config block opens like this:

activate :deploy do

Change it to:

activate :deploy do |deploy|

from middleman-deploy.

tobinfekkes avatar tobinfekkes commented on July 22, 2024

I had all sorts of errors getting this to work, from the above error to "Could not find command 'deploy'."

After loads of Googling, simply changing the gemFile from (what the repo readme says to do)

gem 'middleman-deploy', '~> 1.0'

to

gem 'middleman-deploy', github: 'middleman-contrib/middleman-deploy', branch: 'master'

fixed all the deploy issues. Of course, run bundle build afterwards.

The middleman-deploy readme should probably be account for Middleman 4.0.

from middleman-deploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.