Problems with the rails console, RVM and readline

前端 未结 7 557
谎友^
谎友^ 2020-12-04 11:40

I\'ve installed rvm as a way of making sure that my local development version of ruby is the same as my server\'s for a particular app i work on (ruby 1.8.7). I\'ve done th

7条回答
  •  南笙
    南笙 (楼主)
    2020-12-04 11:50

    I had a similar problem it was with 1.9.2 on Ubuntu 10.04, but the symptoms were identical. In order to get it to work:

    rvm pkg install readline
    

    or prior to RVM version 1.6.32, you need the following command

    rvm package install readline
    

    Then:

    apt-get install ncurses-dev
    

    And then taking from their instructions at http://rvm.beginrescueend.com/packages/readline/

    cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline
    ruby extconf.rb -- --with-readline-dir="$HOME/.rvm/usr"
    make install
    

    I had actually done a system rvm install on the server, so I needed to do this:

    cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline
    ruby extconf.rb -- --with-readline-dir="/usr/local/rvm/usr"
    make install
    

    After that I was able to have full access to the console.

提交回复
热议问题