Rails "there is no such file to load - rubygems (LoadError)"

I just switched from Heroku to Amazon Web Services. I used to run all Rails command line commands using my Ruby command line (from my Windows PC). However, after I logged into my Amazon Linux EC2 instance and then went into my application directory, I get this error:

/usr/bin/rails:9:in `require': no such file to load -- rubygems (LoadError)
    from /usr/bin/rails:9

when I try to run any commands, for example rails console.

I reviewed this question , but it doesn’t look like several Ruby libraries are applied to me because

which -a ruby

only displays one location:

/usr/bin/ruby

Also, this question did not seem to help, as did I. When I tried to enter text

rvm use 1.9.3

I get this message:

-bash: rvm: command not found

Linux, . !

+5
3

. EC2 , 1,8 (ruby -v). EC2, , Elastic Beanstalk EC2 . 1.9.3, . , , . , .

+1
-bash: rvm: command not found

, rvm , , .

gem, .

- .

! sudo bundle install 2.3.8 3.0.0.beta3. , Gemfile.

, , , (, , ).

sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison subversion

rvm , Ruby.

1 rvm install 1.9.3

2 rvm use 1.9.3 --default

, , RVM - ruby ​​ osx? ( RVM )

0

gem install bundler. rvm install

0

All Articles