[ANN] emacs-clojure-vagrant: a sane development virtual environment

332 views
Skip to first unread message

Justin Lilly

unread,
Jun 27, 2011, 12:50:57 AM6/27/11
to Seajure Mailing List, Clojure Mailing List
I've put together a simple development environment for those looking
for a stable place to work on clojure code. The idea was dual purpose:
a consistent environment for which to try out multiple code bases and
something that is familiar to me when working on a foreign operating
system.

The included vagrant file will setup an Ubuntu 11.04 virtual machine
with clojure and clojure-contrib 1.2, emacs 24 (with emacs-starter-kit
2 and all relevant clojure modes), tmux (similar to GNU screen),
Leiningen and Jark.

Special thanks to Phil Hagelberg for his help getting things setup.

Please check out the github project hosted by the Seajure user group
at https://github.com/Seajure/emacs-clojure-vagrant . Your forks and
contributions are appreciated.

Thanks,
-justin

Brett Morgan

unread,
Jun 27, 2011, 8:58:23 AM6/27/11
to clo...@googlegroups.com
Hi Justin,

I just tried out your vagrant script, and it appears to be dying on an unmet dependency:

[default] --2011-06-27 06:33:42--  https://github.com/downloads/icylisper/jark/jark-0.3
[default] 207.97.227.239
[default] 
[default] connected.
[default] 404 Not Found
[default] 2011-06-27 06:33:44 ERROR 404: Not Found.

Any suggestions for working around this?

brett

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Phil Hagelberg

unread,
Jun 27, 2011, 10:46:39 AM6/27/11
to clo...@googlegroups.com
Brett Morgan <brett....@gmail.com> writes:

> I just tried out your vagrant script, and it appears to be dying on an
> unmet dependency:
>
> [default] --2011-06-27 06:33:42--
>  https://github.com/downloads/icylisper/jark/jark-0.3
> [default] 207.97.227.239
> [default] 
> [default] connected.
> [default] 404 Not Found
> [default] 2011-06-27 06:33:44 ERROR 404: Not Found.
>
> Any suggestions for working around this?

I just opened an issue for this last night. For the time being it may be
best to just comment out the jark section of the script until it's fixed.

https://github.com/icylisper/jark/issues/51

-Phil

Brett Morgan

unread,
Jun 27, 2011, 5:45:39 PM6/27/11
to clo...@googlegroups.com
Thanks Phil, I added a bit of context to the bug report and I am tracking it. 

brett


--

isaac praveen

unread,
Jun 28, 2011, 3:30:27 AM6/28/11
to clo...@googlegroups.com
Justin,

Sorry about the missing link. Github upload had some issues with
Chrome and hence took a while for me to update the latest jark-0.3
binary. It is up now:
https://github.com/downloads/icylisper/jark/jark-0.3


--
isaac
http://icylisper.in

nil

unread,
Jul 6, 2011, 5:20:31 PM7/6/11
to Clojure
I'm on a Windows machine. Does the output below indicate that I need
something like cygwin? Thanks in advance!

[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] Running provisioner: Vagrant::Provisioners::Shell...
[default] stdin: is not a tty
[default] bash: /tmp/vagrant-shell: /bin/bash^M: bad interpreter: No
such file or directory
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell
/tmp/vagrant-shell

The output of the command prior to failing is outputted below: [no
output]

Justin Lilly

unread,
Jul 6, 2011, 8:50:17 PM7/6/11
to clo...@googlegroups.com
I don't have access to a windows machine to help you debug this, but
this is squarely an issue with the vagrant installation. I would
suggest reading

http://vagrantup.com/docs/getting-started/setup/windows.html

As a starting point. Vagrant related channels should be able to help
you further (but please communicate your solution back to the group!).

Thanks,
-justin

Sunil S Nandihalli

unread,
Jul 7, 2011, 4:01:16 AM7/7/11
to clo...@googlegroups.com
Hi 

I am new to both vagrant and ruby. I followed the steps in the readme up to step 3 .. but after running "vagrant up" I get

/var/lib/gems/1.8/gems/vagrant-0.7.6/bin/vagrant:2:in `require': no such file to load -- vagrant (LoadError)
from /var/lib/gems/1.8/gems/vagrant-0.7.6/bin/vagrant:2

can somebody help me resolve this?
Thanks,
Sunil.

nil

unread,
Jul 7, 2011, 12:30:18 PM7/7/11
to Clojure
Setting up PuTTY and the vagrant.ppk file (according to the page you
mentioned) helps. PuTTY successfully gives me a vagrant@natty session
*but* "vagrant ssh" doesn't behave any differently -- so I can't tell
if this is fine or if I'm missing something.

Also, if I type emacs at the prompt, I get the following... I thought
emacs 24 was in the VM, no?

vagrant@natty:~$ emacs
The program 'emacs' can be found in the following packages:
* emacs23
* emacs23-nox
* e3
* emacs-snapshot
* emacs-snapshot-nox
* emacs23-lucid
* jove
Try: sudo apt-get install <selected package>
vagrant@natty:~$

Justin Lilly

unread,
Jul 7, 2011, 2:39:09 PM7/7/11
to clo...@googlegroups.com
emacs24 should be installed. My suggestion would be to delete the vm
and restart. Perhaps not having putty broke the initial install? If it
breaks, please send the full output of the console with what is
broken.

-justin

Joseph Jones

unread,
Jul 8, 2011, 11:37:34 AM7/8/11
to clo...@googlegroups.com, Seajure Mailing List
I'm having a problem on Max OS X 10.6.8 where vagrant hangs setting up the VM right after installing jark. It seems to just stop doing anything. I initially thought that that meant it was completed  but opening a new terminal window and doing vagrant ssh brought me to a VM that had nothing setup. No Jark running (in fact no Jark on the path), no swank, and emacs knew nothing about slime in any way.

I checked out the .emacs.d folder and there was nothing in it so obviously whatever step was supposed to put something there never ran.

Any ideas on what the issue could be?

Thanx,
joe


nil

unread,
Jul 8, 2011, 11:47:36 AM7/8/11
to Clojure
I was using the latest VirtualBox (4.0.10) and it was complaining
about a version mismatch between Guest Additions Version: 4.0.6 and
VirtualBox Version: 4.0.10. So I switched to VirtualBox Version 4.0.6
instead and the output is below. It no longer complains about the
mismatch. I'm continuing to use PuTTY to ssh. The 4.0.6 machine
behaves the same way as 4.0.10: it suggests that I try sudo apt-get
install emacs.

emacs-clojure-vagrant>vagrant up
[default] Provisioning enabled with shell...
[default] Importing base box 'natty32'...
[default] Matching MAC address for NAT networking...
[default] Running any VM customizations...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] Running provisioner: Vagrant::Provisioners::Shell...
[default] stdin: is not a tty
[default] bash: /tmp/vagrant-shell: /bin/bash^M: bad interpreter: No
such file or directory
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell
/tmp/vagrant-shell

The output of the command prior to failing is outputted below:

[no output]

emacs-clojure-vagrant>

Stan Dyck

unread,
Jul 8, 2011, 12:30:16 PM7/8/11
to clo...@googlegroups.com
There was a minor bug in the provisioning script that prevented the .emacs.d directory from being populated but a fix
has been pushed for that.

That being said, I also had the hang issue. I did the same as you; I did a vagrant ssh from a new terminal window and
everything worked. Also, after bringing down the virtual server and bringing it up again, the problem has not recurred.
I haven't had the time to figure out why it hung in the first place though.

StanD.

On 07/08/2011 08:37 AM, Joseph Jones wrote:
> I'm having a problem on Max OS X 10.6.8 where vagrant hangs setting up the VM right after installing jark. It seems to
> just stop doing anything. I initially thought that that meant it was completed but opening a new terminal window and
> doing vagrant ssh brought me to a VM that had nothing setup. No Jark running (in fact no Jark on the path), no swank,
> and emacs knew nothing about slime in any way.
>
> I checked out the .emacs.d folder and there was nothing in it so obviously whatever step was supposed to put something
> there never ran.
>
> Any ideas on what the issue could be?
>
> Thanx,
> joe
>
>

> On Sun, Jun 26, 2011 at 9:50 PM, Justin Lilly <jus...@justinlilly.com <mailto:jus...@justinlilly.com>> wrote:
>
> I've put together a simple development environment for those looking
> for a stable place to work on clojure code. The idea was dual purpose:
> a consistent environment for which to try out multiple code bases and
> something that is familiar to me when working on a foreign operating
> system.
>
> The included vagrant file will setup an Ubuntu 11.04 virtual machine
> with clojure and clojure-contrib 1.2, emacs 24 (with emacs-starter-kit
> 2 and all relevant clojure modes), tmux (similar to GNU screen),
> Leiningen and Jark.
>
> Special thanks to Phil Hagelberg for his help getting things setup.
>
> Please check out the github project hosted by the Seajure user group
> at https://github.com/Seajure/emacs-clojure-vagrant . Your forks and
> contributions are appreciated.
>
> Thanks,
> -justin
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.

> To post to this group, send email to clo...@googlegroups.com <mailto:clo...@googlegroups.com>


> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to

> clojure+u...@googlegroups.com <mailto:clojure%2Bunsu...@googlegroups.com>

Joseph Jones

unread,
Jul 8, 2011, 1:51:37 PM7/8/11
to clo...@googlegroups.com
When I tried bringing it down and back up, it restarted the whole process over from scratch. Basically, vagrant halt seems to cause the entire VM to disappear as if vagrant destroy was called. :-(

I'll try to re-get from git and see if it works better now.

   To post to this group, send email to clo...@googlegroups.com <mailto:clojure@googlegroups.com>

   Note that posts from new members are moderated - please be patient with your first post.
   To unsubscribe from this group, send email to

   For more options, visit this group at
   http://groups.google.com/group/clojure?hl=en


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to

Joseph Jones

unread,
Jul 9, 2011, 1:47:54 AM7/9/11
to clo...@googlegroups.com
Still no love. Same thing, only this time there wasn't even an empty .emacs.d folder.

Stan Dyck

unread,
Jul 9, 2011, 1:16:51 PM7/9/11
to clo...@googlegroups.com
Another thing to try is this:

1. Bring up the vm with a vagrant up
2. Log in with vagrant ssh
3. Run the /vagrant/clojure_emacs.sh script directly on the vm

That might not work either, but at least you'll get some feedback about what fails from the script output. I'm curious
about why it's failing so let me know if you find out.

StanD.

On 07/08/2011 10:47 PM, Joseph Jones wrote:
> Still no love. Same thing, only this time there wasn't even an empty .emacs.d folder.
>

> On Fri, Jul 8, 2011 at 10:51 AM, Joseph Jones <darkdes...@gmail.com <mailto:darkdes...@gmail.com>> wrote:
>
> When I tried bringing it down and back up, it restarted the whole process over from scratch. Basically, vagrant halt
> seems to cause the entire VM to disappear as if vagrant destroy was called. :-(
>
> I'll try to re-get from git and see if it works better now.
>
>

> at https://github.com/Seajure/__emacs-clojure-vagrant <https://github.com/Seajure/emacs-clojure-vagrant>

Phil Hagelberg

unread,
Jul 9, 2011, 1:59:02 PM7/9/11
to clo...@googlegroups.com

Running the script will probably need Audi fwiw.

-Phil

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to

nil

unread,
Jul 23, 2011, 3:24:32 PM7/23/11
to Clojure
So my problem was the line endings in clojure_emacs.sh were windows-
style, not unix.

But now the next problem with my environment is that the output from
vagrant up reports that emacs can't open the .emacs.d/init.el file. I
suppose it's on this line: emacs --batch -l .emacs.d/init.el -f
package-updates

And the result is there's no match for M-x slime-connect

Joseph Jones

unread,
Jul 27, 2011, 2:34:34 AM7/27/11
to clo...@googlegroups.com
Update: I just got back from vacation and have done a fresh git clone, et all (including updating VB to 4.1.0). I still get the same issue: No error, but a "hang" at Installed Jark (I say hang because the terminal shell is stuck running the vagrant script where I would assume it would have returned once the VM was successfully running).

I opened a new terminal window and ran the clojure_emacs.sh script manually. Unlike last time, this seems to have worked but requied a logout and back in to get jark running and emacs to connect. From there things seems ok.

However, vagrant halt didn't do anything (but hang the shell) and I was forced to shutdown manually from inside the vm (sudo shutdown  now). I did a vagrant up again and it is setting up a brand new VM for me. Not sure what it did with the old VM or why it insists on creating a new one.

If this run doesn't work then I will send all the output to a file and send that to you so you can see if anything seems amiss.

Thanx,
joe

P.S. The current git repo requires at least VB 4.1.0, but the actual image it downloads throws a warning up about the VB Extensions not matching. The VM still has 4.0.6 extensions installed on it.

On Sat, Jul 9, 2011 at 10:16 AM, Stan Dyck <stan...@gmail.com> wrote:
Another thing to try is this:

1. Bring up the vm with a vagrant up
2. Log in with vagrant ssh
3. Run the /vagrant/clojure_emacs.sh script directly on the vm

That might not work either, but at least you'll get some feedback about what fails from the script output. I'm curious about why it's failing so let me know if you find out.

StanD.


On 07/08/2011 10:47 PM, Joseph Jones wrote:
Still no love. Same thing, only this time there wasn't even an empty .emacs.d folder.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages