Code Monkey home page Code Monkey logo

chruby.el's Introduction

chruby.el

Emacs support for Chruby. It works identical to the shell command, after placing chruby.el in your load-path you can

(require 'chruby)
(chruby "jruby-1.7.2")

Interactively, either call M-x chruby-use which will prompt for a ruby version, or M-x chruby-use-corresponding which tries to get the version from a .ruby-version file.

In fact just like Chruby it is extremely lightweight, it merely follows the same conventions for finding rubies on your system.

Some of the code was taken from rvm.el by Yves Senn, however any violations of good style are entirely mine.

There is currently no support for Chruby's 'auto' functionality.

Copyright 2013-2014 Arne Brasseur

For license details refer to the LICENSE file.

chruby.el's People

Contributors

gguimaraesbr avatar jarednorman avatar kaiserprogrammer avatar keegnotrub avatar kofno avatar pjaspers avatar plexus avatar purcell avatar syohex avatar til avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chruby.el's Issues

Make available via MELPA

I'm fairly new to Emacs and have begun customising. I'm using Cask & Pallet and which is awesome for managing dependencies (similar to Bundler for Ruby projs) and it would be great if chruby.el could be installed via list-packages.

Are there any plans to put chruby.el on one of the repos such as MELPA (or Marmalade) - I'm completely unaware if this requires much work so apologies if I've underestimated the requirements to do this.

Thanks for chruby.el I'm a big fan of Chruby and I was pleasantly surprised that someone had created Emacs support for it.

Chruby appears to have no effect. What am I missing?

Can't seem to track this down, so I'm looking for some help. I'm hoping that I am just overlooking something dumb and obvious.

In my init I have:

(require 'chruby)
(chruby "ruby-2.1.1")

but it doesn't seem to have any effect. I verified the settings in ielm:

ELISP> (chruby "2.1.1")
("/Users/sme/.gem/ruby/2.0.0/bin" "/Users/sme/.rubies/ruby-2.1.1/bin")
ELISP> (chruby)
"ruby-2.1.1"

But using M-! to run ruby -v the system ruby is still run
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

The value of exec-path checked with M-x describe-variable has the correct entries at the front:
("/Users/sme/.rubies/ruby-2.1.1/bin" "/Users/sme/.gem/ruby/2.0.0/bin" "/Users/sme/.gem/ruby/2.1.1/bin" "/Users/sme/.rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/bin" "/Users/sme/Library/Haskell/bin" "/Users/sme/bin" "/\ usr/local/bin" "/usr/local/sbin" "/usr/local/share/npm/bin" "/usr/texbin" "/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/X11/bin" "/Users/sme/.ec2" "/Users/sme/.go/bin" "/usr/local/Cellar/emacs/HEAD/libexec/emacs/2\ 4.3.50/x86_64-apple-darwin13.1.0")

I must be missing something. Thanks for any help!

Approximate/fuzzy ruby versions may mismatch

The original chruby command allows specifying "fuzzy" ruby versions without the patch number, e.g. 2.4 which will load the highest matching available version from the 2.4 series.

Unfortunately, chruby.el does not understand this, and can actually mismatch if there's another version of ruby available which contains the "fuzzy" substring. Concretely, if you have 2.2.4 and 2.4.1 installed, calling chruby-use-corresponding when .ruby-version contains 2.4 will activate 2.2.4, not 2.4.1.

I'm a totally elisp newbie, but I think the fix will be on this line:

(and (string-match name ruby) ruby))

cl.el dependency

When running chruby.el without loading cl.el I was getting the following error:

Symbol's function definition is void: mapcan

unmatched error

I'm getting an error whenever I run "ruby -v":

(eval):1: unmatched "
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin12.4.0]

I've just dropped chruby.el in my Prelude's personal folder and included the following two lines in my personal settings:

(require 'chruby)
(chruby "ruby-1.9.3-p429")

Any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.