问题
Completely new to Ruby on Rails. My environment is Windows 2008 R2, and I just use the RailsInstaller to set it up. I was given a website, so I placed it under C:\Sites. I followed the guide, and installed rails, as you can see the version down there in the code. Then I ran "rails server" to try to start the service, but I was given error message about "therubyracer-heroku-0.8.1.pre3 not installed, so I did a gem install and bundle install after that. Then therubyracer-heroku threw bunch of error, so I looked that up, told me I need to wrap it in a group, which I did and removed from production group within the gem file. Now when I do a "bundle install" everything is good, so I proceed with "rails server" and I got the error message down below. Any help ? please
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'
-The Error output
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:
The zeus
gem requires Linux or Mac OS X See https://github.com/burke/zeus
Remove the zeus gem from your Gemfile, run bundle install
, and then retry rails server
来源:https://stackoverflow.com/questions/17978412/cannot-load-such-file-pty-loaderror