`rails s` says `require': cannot load such file -- pty (LoadError) in Windows RailsInstaller
The backtrace tells us that the web-console gem wants Ruby's pty library. Unfortunately PTYs (pseudo-terminals) are a Unix/Linux feature which does not exist on Windows, so that Ruby library doesn't either.
You can get moving in a couple of ways:
If you don't care about the web-console gem right now, just remove it from your Gemfile.
If you really need the web-console gem, try replacing web-console with these gems:
gem 'rubysl-pty', platforms: :ruby
gem 'web-console-rails3', platforms: :rubySource: a web-console Github issue.
Ruby pty spawn shell command fails
you have no telnet command available directly.
you can try one of several ways to handle it
- specify full path to command
- make sure the path environment variable (usually PATH) that you have in the environment used by ruby contains the folder where telnet resides.
minitest' gem not found during production bundle install
Login to the server by ubuntu
user and run gem update bundler
and after cap deploy
from local machine.
Ruby - Problems with Expect and Pty
For this I recommend using the net-ssh gem: sudo gem install net-ssh
: http://net-ssh.rubyforge.org/ssh/v2/api/index.html
The code goes a little like this:
require 'rubygems'
require 'net/ssh'
Net::SSH.start('your-server', 'username', :password => "password") do |ssh|
puts ssh.exec!("ls -la")
end
Related Topics
Rails 3.2 Create a Form That's Used in the Footer of Every Page
Ruby on Rails: Create Confirmation View Before Creating the Object
"/#Action" Route in Routes.Rb in Ruby on Rails
Uploading a File to a S3 Presigned Url
Gmaps4Rails:Setting Map Width and Height
How to Cancel Evaluating a Required Ruby File? (A.K.A. Top-Level Return)
What Is an Eoferror in Ruby File I/O
Defined' and 'Unless' Not Working as Expected
Rails Adding Multiple Objects to an Empty Array
How to Specify Formatting Options for To_Yaml in Ruby
How to Split String into 2 Parts After Certain Position
Rails: Organizing Models in Subfolders Having Warning: Toplevel Constant a Referenced by B::A
Ruby - Convert Integer to String