2017-02-27 88 views
0

每次我在安裝Stripe gem後嘗試啓動Rails服務器時,都會收到此錯誤消息。Stripe Gem的問題

$ rails s 
/home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe.rb:23:in `require': /home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe/errors.rb:20: syntax error, unexpected tLABEL (SyntaxError) 
...alize(message=nil, http_status: nil, http_body: nil, json_bo... 
...        ^
/home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe/errors.rb:20: Can't assign to nil 
...(message=nil, http_status: nil, http_body: nil, json_body: n... 
...        ^
/home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe/errors.rb:20: Can't assign to nil 
...tp_status: nil, http_body: nil, json_body: nil, 
...        ^
/home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe/errors.rb:20: Can't assign to nil 
/home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe/errors.rb:39: class definition in method body 
/home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe/errors.rb:45: class definition in method body 
/home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe/errors.rb:52: class definition in method body 
/home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe/errors.rb:57: class definition in method body 
/home/alex/.rvm/gems/[email protected]/gems/stripe-2.0.1/lib/stripe/errors.rb:60: syntax error, unexpected tLABEL 
...sage, param, code, http_status: nil, http_body: nil, json_bo... 

我覺得這是我的紅寶石版中的問題是1.9.3,因爲據我所知條紋不支持紅寶石版本1.9,但我還沒有發現任何具體的有關這一點。你們知道如果有可能讓Stripe使用Ruby 1.9嗎?

謝謝!

+6

它說它需要Stripe Github頁面上的Ruby 2.0+。我不認爲他們只是爲了好玩而把它放在那裏。聽起來像是升級Ruby環境的時間。 – Casper

+0

他們的RubyGems頁面(https://rubygems.org/gems/stripe)表示它需要> = 1.9.3 ... – ardavis

+0

有人應該更新它,如果它確實需要2+ https://github.com/條紋/條紋紅寶石/斑點/主/ stripe.gemspec#L8 – ardavis

回答

1

您的服務器應啓動條紋版本< = 1.58.0。它可能缺少一些功能,但我能夠得到一個運行該版本和Ruby 1.9.3的服務器。