Ubuntu 中的 Middleman 安装有问题
Trouble with Middleman installation in Ubuntu
我使用 gem install middleman
安装了中间人,我可以在本地 gem 列表
中看到 gem
middleman (4.3.5)
middleman-cli (4.3.5)
middleman-core(4.3.5
但是当我输入 middleman -v
我得到
Unknown switches "-v"
如果我输入 middleman --version
我会得到
Unknown switches "--version"
Did you mean? "--verbose"
which middleman
returns home/.rbenv/shims/middleman
which ruby
returns home/.rbenv/shims/ruby
我默认是 运行 ruby 版本 2.6.3
在 Ubuntu 18.04
我这两天一直在尝试安装 Middleman,一直 运行 出问题;它正在变成一场噩梦!
到底是什么问题? middleman
安装成功。它只是不支持您尝试传递的开关。您是否尝试过 middleman init project_name
中定义的 README?因为您收到显示的错误消息这一事实表明中间人已正确安装并且将正常工作。你只需要 运行 它,就像这样:
foo:~|⇒ which middleman
/Users/foo/.rvm/gems/ruby-2.6.3/bin/middleman
foo:~|⇒ middleman
/Users/foo/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
== Could not find a Middleman project config.rb
foo:~|⇒ middleman --version
/Users/foo/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
Unknown switches "--version"
Did you mean? "--verbose"
foo:~|⇒ middleman init foo
/Users/foo/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
run git clone --depth 1 https://github.com/middleman/middleman-templates-default.git /var/folders/ts/qq2cd6pn42d15jrhc36cxbtw0000gn/T/d20191106-69912-29f30z from "."
Cloning into '/var/folders/ts/qq2cd6pn42d15jrhc36cxbtw0000gn/T/d20191106-69912-29f30z'...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 19 (delta 0), reused 12 (delta 0), pack-reused 0
Unpacking objects: 100% (19/19), done.
exist
create .gitignore
create Gemfile
create config.rb
create source/images/.keep
create source/index.html.erb
create source/javascripts/site.js
create source/layouts/layout.erb
create source/stylesheets/site.css.scss
run bundle install from "./foo"
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32, java, x64-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32 java x64-mingw32`.
The dependency wdm (~> 0.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32, x64-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32 x64-mingw32`.
Fetching gem metadata from https://rubygems.org/...............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Fetching minitest 5.13.0
Installing minitest 5.13.0
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.1
Installing public_suffix 4.0.1
Fetching addressable 2.7.0
Installing addressable 2.7.0
Using execjs 2.7.0
Fetching autoprefixer-rails 9.7.1
Installing autoprefixer-rails 9.7.1
Using backports 3.15.0
Using bundler 1.17.3
Using coffee-script-source 1.12.2
Using coffee-script 2.4.1
Using contracts 0.13.0
Using dotenv 2.7.5
Using erubis 2.7.0
Using fast_blank 1.0.0
Using fastimage 2.1.7
Using ffi 1.11.1
Using temple 0.8.2
Fetching tilt 2.0.10
Installing tilt 2.0.10
Using haml 5.1.2
Using hamster 3.0.0
Using hashie 3.6.0
Using kramdown 1.17.0
Using rb-fsevent 0.10.3
Using rb-inotify 0.10.0
Using listen 3.0.8
Using memoist 0.16.0
Using thor 0.20.3
Using middleman-cli 4.3.5
Using padrino-support 0.13.3.4
Using padrino-helpers 0.13.3.4
Fetching parallel 1.18.0
Installing parallel 1.18.0
Using rack 2.0.7
Using sassc 2.2.1
Using servolux 0.13.0
Using uglifier 3.2.0
Using middleman-core 4.3.5
Using middleman 4.3.5
Fetching middleman-autoprefixer 2.10.1
Installing middleman-autoprefixer 2.10.1
Bundle complete! 4 Gemfile dependencies, 42 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
foo:~|⇒
我使用 gem install middleman
安装了中间人,我可以在本地 gem 列表
middleman (4.3.5)
middleman-cli (4.3.5)
middleman-core(4.3.5
但是当我输入 middleman -v
我得到
Unknown switches "-v"
如果我输入 middleman --version
我会得到
Unknown switches "--version"
Did you mean? "--verbose"
which middleman
returns home/.rbenv/shims/middleman
which ruby
returns home/.rbenv/shims/ruby
我默认是 运行 ruby 版本 2.6.3
在 Ubuntu 18.04
我这两天一直在尝试安装 Middleman,一直 运行 出问题;它正在变成一场噩梦!
到底是什么问题? middleman
安装成功。它只是不支持您尝试传递的开关。您是否尝试过 middleman init project_name
中定义的 README?因为您收到显示的错误消息这一事实表明中间人已正确安装并且将正常工作。你只需要 运行 它,就像这样:
foo:~|⇒ which middleman
/Users/foo/.rvm/gems/ruby-2.6.3/bin/middleman
foo:~|⇒ middleman
/Users/foo/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
== Could not find a Middleman project config.rb
foo:~|⇒ middleman --version
/Users/foo/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
Unknown switches "--version"
Did you mean? "--verbose"
foo:~|⇒ middleman init foo
/Users/foo/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
run git clone --depth 1 https://github.com/middleman/middleman-templates-default.git /var/folders/ts/qq2cd6pn42d15jrhc36cxbtw0000gn/T/d20191106-69912-29f30z from "."
Cloning into '/var/folders/ts/qq2cd6pn42d15jrhc36cxbtw0000gn/T/d20191106-69912-29f30z'...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 19 (delta 0), reused 12 (delta 0), pack-reused 0
Unpacking objects: 100% (19/19), done.
exist
create .gitignore
create Gemfile
create config.rb
create source/images/.keep
create source/index.html.erb
create source/javascripts/site.js
create source/layouts/layout.erb
create source/stylesheets/site.css.scss
run bundle install from "./foo"
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32, java, x64-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32 java x64-mingw32`.
The dependency wdm (~> 0.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32, x64-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32 x64-mingw32`.
Fetching gem metadata from https://rubygems.org/...............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Fetching minitest 5.13.0
Installing minitest 5.13.0
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.1
Installing public_suffix 4.0.1
Fetching addressable 2.7.0
Installing addressable 2.7.0
Using execjs 2.7.0
Fetching autoprefixer-rails 9.7.1
Installing autoprefixer-rails 9.7.1
Using backports 3.15.0
Using bundler 1.17.3
Using coffee-script-source 1.12.2
Using coffee-script 2.4.1
Using contracts 0.13.0
Using dotenv 2.7.5
Using erubis 2.7.0
Using fast_blank 1.0.0
Using fastimage 2.1.7
Using ffi 1.11.1
Using temple 0.8.2
Fetching tilt 2.0.10
Installing tilt 2.0.10
Using haml 5.1.2
Using hamster 3.0.0
Using hashie 3.6.0
Using kramdown 1.17.0
Using rb-fsevent 0.10.3
Using rb-inotify 0.10.0
Using listen 3.0.8
Using memoist 0.16.0
Using thor 0.20.3
Using middleman-cli 4.3.5
Using padrino-support 0.13.3.4
Using padrino-helpers 0.13.3.4
Fetching parallel 1.18.0
Installing parallel 1.18.0
Using rack 2.0.7
Using sassc 2.2.1
Using servolux 0.13.0
Using uglifier 3.2.0
Using middleman-core 4.3.5
Using middleman 4.3.5
Fetching middleman-autoprefixer 2.10.1
Installing middleman-autoprefixer 2.10.1
Bundle complete! 4 Gemfile dependencies, 42 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
foo:~|⇒