Open tomoyuki28jp opened 10 years ago
I use rbenv
but I don't use rbenv.el
, and everything works fine for me, at least with Rails 3.x. What is this bin/rails
script? I have a script/rails
instead. What Rails version are you using?
When I start
-*- mode: ruby-compilation; default-directory: "~/Projects/myapp/" -*-
RubyComp started at Tue Sep 30 10:32:13
ruby /Users/steve/Projects/myapp/script/rails server
=> Booting WEBrick
=> Rails 3.2.19 application starting in development on http://0.0.0.0:3000
Try evaluating (executable-find "ruby")
with M-:
in the *server*
buffer -- you should get "/Users/user/.rbenv/shims/ruby"
. If not, then there's a problem with rbenv.el
or your Emacs path setup.
@purcell Thanks for your reply!
What Rails version are you using?
I use 4.0.8
Try evaluating (executable-find "ruby") with M-: in the server buffer -- you should get "/Users/user/.rbenv/shims/ruby".
Yes, I get "/Users/user/.rbenv/shims/ruby".
Hmm, then everything should normally just work, if you have a .rbenv-version
or .ruby-version
file in your project root. But if rbenv.el
has set the RBENV_VERSION
environment variable to something different, I can imagine that things wouldn't work properly. You can test that with M-: (getenv "RBENV_VERSION")
.
@purcell Thanks for your reply.
if you have a .rbenv-version or .ruby-version file in your project root.
I didn't have both of the files, so I created .ruby-version, but result is the same.
You can test that with M-: (getenv "RBENV_VERSION").
(getenv "RBENV_VERSION") ; nil
rbenv--modestring ; (" [" #("2.1.0" 0 5 (face rbenv-active-ruby-face)) "]")
(rbenv--active-ruby-version) ; "2.1.0"
I'm not really sure what's going wrong, then, sorry. Note, though, that I don't use rbenv.el
, so you could try removing that from the mix.
Otherwise, if you could perhaps provide a minimal emacs init file and steps to reproduce it locally, I can investigate, but without that I'm really just guessing.
rinari-web-server does not use rbenv rails path. How can I fix it?
This is output show in the server buffer:
When I run
which rails
on console, I get this:/Users/user/.rbenv/versions/2.1.0/bin/rails
Mac OS: X 10.9.5 Emacs: 24.3 rbenv: 0.4.0 rinari: master from github