evm icon indicating copy to clipboard operation
evm copied to clipboard

Automate `sudo mkdir /usr/local/evm` with Gem installation method

Open cmpitg opened this issue 10 years ago • 6 comments

Hi,

Would it be convenient for the installation method that uses Gem to automate this?

cmpitg avatar Mar 21 '14 03:03 cmpitg

I would not prefer that actually. First, there are many different ways to install Evm, not just via Ruby gem. Second, I don't like doing destructive operations like this automatically. I would like the user to have more control.

rejeep avatar Mar 24 '14 07:03 rejeep

In case this is not automated, it would be nice with a bit more friendly error messages when the directory does not exist. For example this:

$ evm install emacs-24.3-bin
/Users/bjorne/.evm/lib/evm/package.rb:34:in `mkdir': No such file or directory - /usr/local/evm/emacs-24.3-bin (Errno::ENOENT)
    from /Users/bjorne/.evm/lib/evm/package.rb:34:in `install!'
    from /Users/bjorne/.evm/lib/evm/command/install.rb:20:in `initialize'
    from /Users/bjorne/.evm/lib/evm/cli.rb:31:in `new'
    from /Users/bjorne/.evm/lib/evm/cli.rb:31:in `parse'
    from /Users/bjorne/.evm/bin/evm:7:in `<main>'

It would be nice if a the post-install message would remind the user about creating /usr/local/evm as well.

bjorne avatar Sep 19 '14 12:09 bjorne

+1 for adding a nice error message when /usr/local/evm doesn't exist or is not owned by the user.

davidshepherd7 avatar Jun 02 '15 08:06 davidshepherd7

Pull requests are welcome! :)

rejeep avatar Jun 04 '15 19:06 rejeep

I'm confused, do I need to create the directory and update PATH when I do gem install evm?

I tried this, but there is no binary to execute, which evm is blank. I looked in the gem installation directory but only the lib and recipes directories are there, which seems to match with the gemspec file. So, how do I execute this from the command line?

mattdeboard avatar Jan 02 '16 04:01 mattdeboard

@mattdeboard Evm has two directories. One where you install Evm and another where the Emacs versions are installed. The one we are talking about here is the one where the Emacs versions are installed and that should not be added to PATH. You do however need to add the Evm installation directory to PATH.

rejeep avatar Jan 02 '16 14:01 rejeep