amnu3387

amnu3387

Hey, I’m pretty new to emacs (have only used it a bit while reading Clojure for the brave and true). I installed the alchemist package, now by what I understand I should be able to run a repl from inside emacs itself without having to open a terminal window right? and probably start it with iex -S mix phoenix.server ?

Whenever I do M-x alchemist-iex-project-run I get /usr/local/Cellar/elixir/1.5.0/bin/elixir: line 127: exec: erl: not found

Process Alchemist-IEx exited abnormally with code 127

Does anyone know a good resource on how to setup emacs for this? Or should I just fire a terminal and do it normally while editing in emacs? Thanks

Showing Posts 1 to 10

ryh

ryh

Hmmm, are you using a versioning environment like kerl or kiex?

amnu3387

amnu3387 OP

Not really, should I set that up?

ryh

ryh

No need to. They can cause problems with the path though - which is why I asked :slight_smile:

I found this Stack Overflow answer from someone with the same problem: Elixir on Emacs: exec erl not found.

Another way to get a shell in emacs is to use M-x ansi-term RET RET, but it will probably have the same problem :stuck_out_tongue:

NobbZ

NobbZ

How do you start emacs? From a terminal or from your window manager?

If the latter, does the path it knows point to erl location?

Also if you used the latter, does the problem also exist when you start wands from a terminal that can “see” erl?

amnu3387

amnu3387 OP

Thanks I will check that out! When I open the emacs gui from the terminal it doesn’t show the previous error but shows another one from compilation.

amnu3387

amnu3387 OP

Ah I was starting it from the window manager ( and I guess it doesn’t because I haven’t told it ) . Indeed when I open the emacs gui from the terminal it does !!! huuuu how do I tell him what’s the erl location? Or what is the best way to spin emacs? Right now I added it to the mac login, so it’s started by default but this points to the “app” without context - how do you start your emacs session? Thanks!

NobbZ

NobbZ

I don’t know how to do it in macOS… On linux I’d alter the contents of ~/.profile to contain something like this:

export PATH=/path/to/erlang/bin:$PATH

Changes to that file do require me to loout and back in again.

amnu3387

amnu3387 OP

Yeah I use ~/.bash_profile for setting up a lot env stuff the problem is when I load emacs by going to the app it doesn’t care about the profile - when I run it from the terminal it loads the sessions profile and all is good and works. I would just like to have the app open on login (since it runs the emacs.app without context) with the ~/.bash_profile instead of opening a terminal and then executing emacs from it, since alchemist fires up the repl. I will dig a bit more on how to setup the env. Thanks

NobbZ

NobbZ

This is for bash only. .zprofile were for zsh.

~/.profile should be for the user, but as I said, I’m not sure if macOS does it that way as well.

ucwaldo

ucwaldo

Hi there, I’ve just set up emacs gui on macos. I am very used to zsh and faced the same issue of not being able to load the correct SHELL env when starting emacs.app from outside a terminal. Since I use a couple of extra env variables and extend $PATH quite a bit in my .zshrc, this was not really acceptable :wink:

I am using exec-path-from-shell and have configured it like so in my ~/.emacs:

;; ...
(package-initialize)
(when (memq window-system '(mac ns x))
  (exec-path-from-shell-initialize))
;; ...

You will need to export $PATH from ~/.bash_profile or ~/.zshenv (it did not work from ~/.zshrc, but that’s stated in the docs):

export PATH=/usr/local/bin:/usr/bin:/bin # should be enough for most usages
or
export PATH=/usr/local/bin:$PATH # if you ignore what's in the docs ;)

Finally, no trouble finding erl or any other libraries and programs from emacs gui. I hope you already found a solution or that that helps

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews