> I have all the gems installed, rails works, I think the problem is
> related to paths.
> I define gems and ruby path in my .bash_profile, how I define paths in
> rinari....or emacs?
Your .bash_profile will only take effect within bash and programs that
are started from it. It's a bad idea to put anything in there that isn't
directly related to bash. Use ~/.profile instead. You will have to log
out and log back in for your changes to take effect.
Things are a little different on OS X; someone was telling me there's
really no good way to add to your path without editing some crazy plist
XML file somewhere. I don't use OS X, but if that is the problem then
I'm sure someone else on the list can elaborate.
-Phil
Carbon Emacs appears to load .profile, but the newest HEAD builds of
NS Emacs do not. I finally got this and other env vars working with
the following:
(if window-system
(progn
(ns-grabenv "/bin/bash" '("source ~/.profile" "printenv"))
...
...))
(dolist (dir (mapcar 'expand-file-name '("/usr/local/bin" "/opt/
local/bin"
"/opt/local/lib/
postgresql83/bin" "~/bin")))
(setenv "PATH" (concat dir ":" (getenv "PATH")))
(setq exec-path (append (list dir) exec-path)))
See http://github.com/purcell/emacs.d/tree/master for the full context.
Michael's trick looks neat too, at the cost of being NextStep/Cocoa-
specific.
-Steve
> Hi, I think I correctly set env path.
> Now rinari-console works, even script/server works from a shell
> buffer, but if I try rinari-web-server
> I get the same error: "Missing the Rails gem. Please `gem install -v=
> rails` ......"
>
Do you have the RUBYOPT environment variable set to rubygems? You can
check this by executing (environment) from your *scratch* buffer and
then looking at the list in your *messages* buffer.
You can set this by putting
(setenv "RUBYOPT" "rubygems")
in your init file.
If that doesn't fix it I don't know what the issue could be. -- Eric