eschulte/rinari

Rinari Console doesn't take into account rbenv

seanhagen opened this issue · 8 comments

When I try to run rinari-console, I keep getting errors about certain gems not being installed. If I run 'bundle install' ( from eshell or from a seperate terminal window ), rinari-console continues to complain about the missing gems.

What really confounds me is that rinari-web-server runs fine without any issues.

Is there any way to get rinari-console to take into account the local rbenv environment, or am I out of luck?

Okay... this works fine for me, so I need to ask you for some more info:

  • Which version of rinari?
  • From which buffer are you starting rinari-console? It its default-directory inside the RAILS_ROOT?
  • Are you using a .rbenv-version, or is your rbenv version for your project specified in some other way?
  • If you eval (with M-:) the expression (executable-find "rails"), is the result what you expect?

-Steve

More info!

  • when I checked rinari.el, it said:
    • Version: DEV
    • Created: 2006-11-10
    • so I deleted my rinari folder and re-downloaded it from git://github.com/eschulte/rinari.git ( and still got the same error )
    • there doesn't seem to be a rinari-version function, so I didn't know where to look
  • I usually open the Gemfile ( first file that shows up in IDO ), and then run rinari-console in that buffer
  • Using a .rbenv-version in the same folder as the Gemfile ( and using version 1.9.3-p327 )
  • Evaling (executable-find "rails") returns /home/sean/.rbenv/shims/rails (which is correct)

Hmm, okay. And are you using the bundled ruby-compilation and the inf-ruby from the git submodule? Rinari uses the latter for rinari-console and the former for rinari-web-server.

(BTW, I strongly recommend installing rinari from either Marmalade or MELPA -- that's the setup which "just works" for me, and it ensure the correct dependencies are installed. The Marmalade version is currently in need of an update, but the MELPA package is built a fully-working git snapshot.)

Oh, and other thoughts: which Rails version are you using? And do you have console and server scripts under RAILS_ROOT/script?

Sorry for all the questions... I'd really like to help you get this working. :-)

I'm using Rails 3.2.8. The only file in RAILS_ROOT/script is rails. To get a Rails console or Rails server, I usually just run rails c or rails s, respectively.

No worries! I'll answer any questions you've got, I want to get this working too! =D

Now, rinari will actually run RAILS_ROOT/script/rails if it exists, which might not be the same rails you see from the command line; perhaps try running it directly with console and server to see if it behaves correctly.

Sorry it's been a while since I posted on this issue, life got in the way.

Since I last posted, I've started completely from scratch with a brand new Emacs install ( brand new Ubuntu install, to be honest ). Apparently I might have had a rvm.el file floating around somewhere, because now rinari console works just fine!

I feel pretty darn stupid, but at least this issue seems to have resolved itself. I'm going to close the issue, but thanks for all your help!

No problem -- very happy to hear things are working for you now.