これが私のsinatraアプリケーションのディレクトリ構造です
➜ app-fin git:(master) ls
public/ views/ birthday_countdown.rb config.ru Gemfile Gemfile.lock Procfile web.rb
私のGemfileは
source 'https://rubygems.org'
gem 'sinatra'
gem 'thin'
プロフィール
web: bundle exec ruby web.rb -p $PORT
そしてconfig.ru
$:.unshift File.expand_path("../", __FILE__)
require './web'
run Sinatra::Application
Heroku にプッシュしようとすると、このエラーが発生します。
-----> Heroku receiving push
-----> Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.6.20
Using npm version: 1.0.106
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
npm ERR! Couldn't read dependencies.
npm ERR! Error: Invalid name: "Sinatra Class" may not start with '.' or contain %/@+: or whitespace
npm ERR! at /tmp/node-npm-cVE5/lib/utils/read-json.js:229:13
npm ERR! at /tmp/node-npm-cVE5/lib/utils/read-json.js:134:32
npm ERR! at P (/tmp/node-npm-cVE5/lib/utils/read-json.js:110:40)
npm ERR! at cb (/tmp/node-npm-cVE5/node_modules/graceful-fs/graceful-fs.js:36:9)
npm ERR! at [object Object].<anonymous> (fs.js:123:5)
npm ERR! at [object Object].emit (events.js:64:17)
npm ERR! at Object.oncomplete (fs.js:1190:12)
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR!
npm ERR! System Linux 2.6.32-346-ec2
npm ERR! command "/tmp/node-node-yUVv/bin/node" "/tmp/node-npm-cVE5/cli.js" "install" "--production"
npm ERR! cwd /tmp/build_16s1spp2lcght
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.0.106
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_16s1spp2lcght/npm-debug.log
npm not ok
! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app
私のアプリがnode.jsを使用する必要があると考える理由について当惑しています。実際にsinatraアプリであることをherokuに納得させる方法について誰か考えがありますか?