ここ数週間、クラス プロジェクトの 1 つで Middleman をセットアップするのに苦労しています。私のプロジェクトは HTML 5 を使用しており、Android 用に開発されます。プロジェクトは github にあり、Ubuntu でクローンを作成し、コマンド「middleman build」を入力しようとしましたが、ビルドが失敗したことを示す出力が得られました。出力は以下のとおりです。
[WARNING] MultiJson is using the default adapter (ok_json).We recommend loading a different JSON library to improve performance.
create www/res/icon/ios/icon-57.png
create www/res/screen/bada-wac/screen-type4.png
create www/res/icon/windows-phone/icon-173-tile.png
create www/icon.png
create www/res/icon/ios/icon-57-2x.png
create www/res/screen/ios/screen-iphone-portrait-2x.png
create www/res/screen/android/screen-ldpi-portrait.png
create www/res/screen/bada-wac/screen-type5.png
create www/res/screen/android/screen-ldpi-landscape.png
create www/res/screen/ios/screen-iphone-portrait-568h-2x.png
create www/res/icon/ios/icon-72.png
create www/res/icon/bada-wac/icon-80-type4.png
create www/res/screen/ios/screen-ipad-landscape.png
create www/res/screen/ios/screen-iphone-portrait.png
create www/res/screen/android/screen-hdpi-portrait.png
create www/res/screen/android/screen-mdpi-landscape.png
create www/res/screen/ios/screen-iphone-landscape-2x.png
create www/res/screen/android/screen-mdpi-portrait.png
create www/res/screen/bada/screen-portrait.png
create www/res/icon/tizen/icon-128.png
create www/res/icon/windows-phone/icon-62-tile.png
create www/res/icon/android/icon-72-hdpi.png
create www/res/icon/android/icon-36-ldpi.png
create www/res/screen/ios/screen-ipad-landscape-2x.png
create www/res/screen/ios/screen-ipad-portrait.png
create www/res/screen/bada-wac/screen-type3.png
create www/res/icon/ios/icon-72-2x.png
create www/res/icon/android/icon-96-xhdpi.png
create www/res/screen/blackberry/screen-225.png
create www/res/screen/ios/screen-ipad-portrait-2x.png
create www/res/screen/webos/screen-64.png
create www/res/screen/android/screen-xhdpi-portrait.png
create www/res/icon/bada-wac/icon-48-type5.png
create www/res/icon/bada/icon-128.png
create www/res/icon/windows-phone/icon-48.png
create www/res/icon/android/icon-48-mdpi.png
create www/res/screen/android/screen-hdpi-landscape.png
create www/res/screen/android/screen-xhdpi-landscape.png
create www/res/icon/webos/icon-64.png
create www/res/icon/bada-wac/icon-50-type3.png
create www/res/icon/blackberry/icon-80.png
create www/res/screen/ios/screen-iphone-landscape.png
create www/res/screen/windows-phone/screen-portrait.jpg
create www/app/models/user.js
create www/app/views/tutorial_view.js
create www/app/routes/application_route.js
create www/app/controllers/index_controller.js
create www/app/components/calendar.js
/var/lib/gems/1.8/gems/tilt-1.3.7/lib/tilt/template.rb:118:in `require': no such file to load -- json (LoadError)
(in /home/javaholic/schollaborate/source/app/templates/application.handlebars)
from /var/lib/gems/1.8/gems/tilt-1.3.7/lib/tilt/template.rb:118:in `require_template_library'
from /var/lib/gems/1.8/gems/sprockets-handlebars_template-1.0.0/lib/sprockets/handlebars_template.rb:29:in `initialize_engine'
from /var/lib/gems/1.8/gems/tilt-1.3.7/lib/tilt/template.rb:56:in `initialize'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/context.rb:196:in `new'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/context.rb:196:in `evaluate'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `each'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `evaluate'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:12:in `initialize'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `new'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:395:in `circular_call_protection'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:373:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:111:in `resolve_dependencies'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:105:in `each'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:97:in `build_required_assets'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:16:in `initialize'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `new'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:395:in `circular_call_protection'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:373:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:111:in `resolve_dependencies'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:105:in `each'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:97:in `build_required_assets'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:16:in `initialize'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `new'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:395:in `circular_call_protection'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:373:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/bundled_asset.rb:16:in `initialize'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:377:in `new'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:377:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/environment.rb:75:in `find_asset'
from /var/lib/gems/1.8/gems/sprockets-2.10.0/lib/sprockets/server.rb:47:in `call'
from /var/lib/gems/1.8/gems/middleman-sprockets-3.1.4/lib/middleman-sprockets/extension.rb:244:in `call'
from /var/lib/gems/1.8/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
from /var/lib/gems/1.8/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `call'
from /var/lib/gems/1.8/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
from /var/lib/gems/1.8/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-more/extensions/minify_javascript.rb:42:in `call'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-more/extensions/minify_css.rb:48:in `call'
from /var/lib/gems/1.8/gems/rack-1.5.2/lib/rack/lint.rb:49:in `_call'
from /var/lib/gems/1.8/gems/rack-1.5.2/lib/rack/lint.rb:37:in `call'
from /var/lib/gems/1.8/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
from /var/lib/gems/1.8/gems/rack-test-0.6.2/lib/rack/mock_session.rb:30:in `request'
from /var/lib/gems/1.8/gems/rack-test-0.6.2/lib/rack/test.rb:230:in `process_request'
from /var/lib/gems/1.8/gems/rack-test-0.6.2/lib/rack/test.rb:57:in `get'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-core/cli/build.rb:138:in `render_to_file'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-core/cli/build.rb:280:in `execute!'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-core/cli/build.rb:277:in `each'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-core/cli/build.rb:277:in `execute!'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-core/cli/build.rb:199:in `invoke!'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/actions.rb:95:in `action'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-core/cli/build.rb:64:in `build'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in `__send__'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-core/cli.rb:77:in `method_missing'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:29:in `__send__'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:29:in `run'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:128:in `run'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /var/lib/gems/1.8/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/lib/middleman-core/cli.rb:22:in `start'
from /var/lib/gems/1.8/gems/middleman-core-3.1.6/bin/middleman:18
from /usr/local/bin/middleman:19:in `load'
from /usr/local/bin/middleman:19
私のチームメイトと私が期待していた出力は、Middleman が phonegap のすべての Web アセットをビルドし、ビルドが成功したということはエラーがないことを意味します。したがって、「phonegap local run android」を実行して、エミュレーターまたはデバイスのいずれかで起動できるはずです。ただし、エミュレーターは表示されず、出力は代わりに次のようになりました。
[phonegap] adding the Android platform...
fs.js:427
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory '/home/javaholic/schollaborate/www/config.xml'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/phonegap/node_modules/cordova/src/xml-helpers.js:107:27)
at Object.config_parser (/usr/local/lib/node_modules/phonegap/node_modules/cordova/src/config_parser.js:25:20)
at Object.platform (/usr/local/lib/node_modules/phonegap/node_modules/cordova/src/platform.js:64:15)
at LocalBuildCommand.module.exports.addPlatform (/usr/local/lib/node_modules/phonegap/lib/phonegap/local.build.js:153:13)
at LocalBuildCommand.execute (/usr/local/lib/node_modules/phonegap/lib/phonegap/local.build.js:95:32)
at LocalBuildCommand.run (/usr/local/lib/node_modules/phonegap/lib/phonegap/local.build.js:70:10)
at Object.build (/usr/local/lib/node_modules/phonegap/lib/phonegap/util/command.js:28:25)
at LocalRunCommand.execute (/usr/local/lib/node_modules/phonegap/lib/phonegap/local.run.js:68:25)
私の phonegap バージョンは 3.1 です。bundle install を試し、代わりにコマンド「bundle exec middleman build」を試しましたが、どちらも機能しませんでした。私は試してみるべきことについてのアイデアが不足しているので、どんな助け/提案も素晴らしいでしょう. ありがとう。