我試圖用這個創業板:php_serialize寶石不加載
I型
gem install php-serialize
,並在我的main.rb的紅寶石應用
require 'php_serialize'
結果是
Boot Error
Something went wrong while loading main.rb
LoadError: cannot load such file -- php_serialize
環境是西納特拉,在我main.rb的我:
require 'rubygems'
require 'sanitize'
require 'sinatra'
require 'active_record'
require 'nokogiri'
require 'open-uri'
require 'uri'
require 'pry'
require 'chronic'
require 'json'
require 'zip'
require 'php_serialize'
任何想法?
更新
RubyGems Environment:
- RUBYGEMS VERSION: 2.1.11
- RUBY VERSION: 2.0.0 (2013-11-22 patchlevel 353) [x86_64-darwin13.0.0]
- INSTALLATION DIRECTORY: /Users/scrivoaroby/.rvm/gems/ruby-2.0.0-p353
- RUBY EXECUTABLE: /Users/scrivoaroby/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
- EXECUTABLE DIRECTORY: /Users/scrivoaroby/.rvm/gems/ruby-2.0.0-p353/bin
- SPEC CACHE DIRECTORY: /Users/scrivoaroby/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-13
- GEM PATHS:
- /Users/scrivoaroby/.rvm/gems/ruby-2.0.0-p353
- /Users/scrivoaroby/.rvm/gems/[email protected]
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/scrivoaroby/.rvm/gems/ruby-2.0.0-p353/bin
- /Users/scrivoaroby/.rvm/gems/[email protected]/bin
- /Users/scrivoaroby/.rvm/rubies/ruby-2.0.0-p353/bin
- /Users/scrivoaroby/.rvm/bin
- /usr/local/git/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/bin
- /usr/local/git/bin
- /opt/ImageMagick/bin
其中獵槍
/Users/scrivoaroby/.rvm/gems/ruby-2.0.0-p353/bin/shotgun
2.0.0
== Shotgun/Thin on http://127.0.0.1:9393/
Thin web server (v1.6.1 codename Death Proof)
Maximum connections set to 1024
Listening on 127.0.0.1:9393, CTRL+C to stop
你在你的應用程序中使用捆紮機?如果是這樣,請檢查您是否已將'php-serialize'添加到'Gemfile'中。如果不是,你可以在你的問題中加入'gem env'和'shotgun'的結果嗎?另外,運行'shotgun -e'的結果是放入RUBY_VERSION「my_app.rb」可能很有用(顯然,將my_app.rb更改爲您的應用程序所調用的任何內容)。 – matt
@matt補充說,我沒有使用打包機 –