NoMethodError: undefined method `name' for "RedCloth":String and can't run make due to ruby/config.h error
I tried the steps in Problems with the rails console, RVM and readline because when I try to run rails or rails console I get a NoMethodError: undefined method `name' for "RedCloth":String
When I try following the steps in the other posts I get a error doing the make because I get
durrantm@michael-laptop:~/.rvm/src/ruby-1.9.2-p180/ext/readline$ make install
gcc -I. -I. -I/usr/lib/ruby/1.8/i686-linux -I. -DHAVE_READLINE_READLINE_H -DHAVE_READLINE_HISTORY_H -DHAVE_RL_GETC_FUNCTION -DHAVE_RL_FILENAME_COMPLETION_FUNCTION -DHAVE_RL_USERNAME_COMPLETION_FUNCTION -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_REFRESH_LINE -DHAVE_RL_DEPREP_TERM_FUNCTION -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_BASIC_WORD_BREAK_CHARACTERS -DHAVE_RL_COMPLETER_WORD_B开发者_如何学编程REAK_CHARACTERS -DHAVE_RL_BASIC_QUOTE_CHARACTERS -DHAVE_RL_COMPLETER_QUOTE_CHARACTERS -DHAVE_RL_FILENAME_QUOTE_CHARACTERS -DHAVE_RL_ATTEMPTED_COMPLETION_OVER -DHAVE_RL_LIBRARY_VERSION -DHAVE_RL_EDITING_MODE -DHAVE_RL_LINE_BUFFER -DHAVE_RL_POINT -DHAVE_RL_EVENT_HOOK -DHAVE_RL_CATCH_SIGWINCH -DHAVE_RL_CATCH_SIGNALS -DHAVE_RL_CLEANUP_AFTER_SIGNAL -DHAVE_RL_CLEAR_SIGNALS -DHAVE_RL_SET_SCREEN_SIZE -DHAVE_RL_GET_SCREEN_SIZE -DHAVE_RL_VI_EDITING_MODE -DHAVE_RL_EMACS_EDITING_MODE -DHAVE_REPLACE_HISTORY_ENTRY -DHAVE_REMOVE_HISTORY -DHAVE_CLEAR_HISTORY -I/home/durrantm/.rvm/usr/include -D_FILE_OFFSET_BITS=64 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -c readline.c
readline.c:22: fatal error: **ruby/config.h**: No such file or directory
compilation terminated.
make: *** [readline.o] Error 1
fyi:
durrantm@michael-laptop:~/.rvm/src/ruby-1.8.7-p334/ext/readline$ ruby extconf.rb && make install
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... no
checking for editline/readline.h... no
make: Nothing to be done for `install'.
durrantm@michael-laptop:~/.rvm/src/ruby-1.8.7-p334/ext/readline$
I had the same problem. If you're using Fedora, you might want to install readline-devel. That should let you find readline.h, etc. When you create your Makefile, use this:
rvm 1.9.2 ruby extconf.rb
instead of just:
ruby extconf.rb
精彩评论