eschulte / rinari

Rinari Is Not A Rails IDE (it is an Emacs minor mode for Rails)
http://rinari.rubyforge.org
GNU General Public License v3.0
413 stars 68 forks source link

rinari-web-server fails after fixing issue 42# in Windows platform. #52

Closed JamesYuan closed 9 years ago

JamesYuan commented 11 years ago

I think this issue is caused by the #42.

In function 'rinari-web-server', it runs (ruby-compilation-run command nil "server")), the command is "ruby c:/dev/scripts/Ruby/first_app/script/rails server" .

In function 'ruby-compilation-run', it runs (ruby-compilation-do name cmdlist), the name is "server", but the cmdlist will be expanded with

("ruby" "c:/dev/scripts/Ruby/first_app/ruby" "c:/dev/scripts/Ruby/first_app/script/rails" "server").

No such "c:/dev/scripts/Ruby/first_app/ruby", it fails.

Also I appended a comment in the issue #42 about the 'rails' in %PATH%, if you have time, please help check it.

Thank you.

JamesYuan commented 11 years ago

Same with rinari-script.

JamesYuan commented 11 years ago

I think we can rollback the #42 and add your lines

(setq command (if (file-executable-p (first (split-string-and-unquote command)))
    command
  (concat ruby-compilation-executable " " command)))

into rinari-console before

(with-current-buffer (run-ruby command "rails console") (dolist (var '(inf-ruby-prompt-pattern inf-ruby-first-prompt-pattern)) (set (make-local-variable var) rinari-inf-ruby-prompt-pattern)) (rinari-launch)) .

This make sure run-ruby is the right one in windows.

purcell commented 9 years ago

This is now fixed. Sorry it took so long.