我试图让我的Heroku应用程序运行使用竹mri 1.9.2堆栈.当然,它在
Ruby 1.9.2上本地运行正常.但是在生产时,它在启动时崩溃,执行config.ru,如下所示:
require 'sinatratestapp' run Sinatra::Application
我的.gems文件:
sinatra --version '>= 1.0'
而应用本身就是sinatratestapp.rb:
require 'rubygems' require 'sinatra' get '/' do "Hello from Sinatra on Heroku!" end
这就是我在项目中所做的一切,并试图运行Heroku的结果:
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- sinatratestapp (LoadError) from <internal:lib/rubygems/custom_require>:29:in `require' from config.ru:1:in `block (3 levels) in <main>' ... -----> Your application is requiring a file that it can't find. Most often this is due to missing gems,or it could be that you Failed to commit the file to your repo. See http://docs.heroku.com/gems for more information on managing gems. Examine the backtrace above this message to debug.
我试图做,因为它指导,但作为一个Ruby noob我的考试没有产生任何结果.