无法加载这样的文件--pty(LoadError)

时间:2013-07-31 18:45:58

标签: ruby-on-rails ruby-on-rails-3.2 rubygems

Ruby on Rails全新。我的环境是Windows 2008 R2,我只是使用了 RailsInstaller来设置它。我有一个网站,所以我把它放在C:\ Sites下。 我按照指南,并安装了rails,因为你可以在代码中看到那里的版本。 然后我运行“rails server”尝试启动该服务,但是我收到了关于“未安装therubyracer-heroku-0.8.1.pre3的错误消息,因此我在那之后进行了gem安装和捆绑安装。然后我的确定了。”扔了一堆错误,所以我查了一下,告诉我我需要把它包装成一个组,我做了并从gem文件中的生产组中删除。现在当我做“捆绑安装”时一切都很好,所以我继续“rails服务器”,我在下面收到了错误消息。有任何帮助吗?请

source 'https://rubygems.org'
ruby '1.9.3'

gem 'rails', '3.2.13'

gem 'pg'
gem 'hashie'
gem 'figaro' # handles app configurations
gem 'airbrake' # exception/error tracking service
gem 'haml'
gem 'validates_existence', '>= 0.4'
gem 'useragent'
gem 'heroku'

group :development do
    gem 'zeus' # speeds up loading of console and server
    gem 'better_errors' # nicely-formatted UI of errors
    gem 'binding_of_caller' # allows real-time debugging on error breakpoints
    gem 'therubyracer', :platforms => :ruby, :require => 'v8'
end

group :production do

end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
end

gem 'sass-rails',   '~> 3.2.5'
gem 'coffee-rails', '~> 3.2.2'
gem 'uglifier'
gem 'jquery-rails'
gem 'prototype-rails'
gem 'coffee-filter'

- 错误输出

    Rails 3.2.13
    ruby 1.9.3p429 (2013-05-15) [i386-mingw32]

    $ rails server
    c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/ac
    tive_support/dependencies.rb:251:in `require': cannot load such file -- pty (LoadError)

    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/zeus-0.13.3/lib/zeus.rb:4:in `<top (required)>'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from c:/Sites/rct/config/application.rb:7:in `<top (required)>'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

1 个答案:

答案 0 :(得分:0)

zeus gem需要Linux或Mac OS X请参阅https://github.com/burke/zeus

从Gemfile中删除zeus gem,运行bundle install,然后重试rails server