ubuntu with mongodb vm needed

86 views
Skip to first unread message

Justin Collum

unread,
Dec 2, 2011, 12:59:19 PM12/2/11
to Portland ALT.NET
Any of y'all know of a place that I can find an ubuntu VM with mongodb pre-installed? I'm using the instructions on the mongo site and running into issues  (which seems typical of my time with Ubuntu). I'd really like to just download a vm that already has it. 

Eric Williams

unread,
Dec 2, 2011, 3:41:18 PM12/2/11
to pdxalt...@googlegroups.com
Justin - 

I usually just co-op a existing VM from Turnkey Linux but this last project I'm working on I went with a bare image from Virtual Boxes (be sure to change from the Italian keyboard layout with this one) and installed Mongo via apt-get which was really simple and very quick.  Redis was a little more more involved with a brutal 4 lines of shell script from wget to make :)

Hope this helps,
Eric

Justin Collum

unread,
Dec 5, 2011, 12:01:53 PM12/5/11
to pdxalt...@googlegroups.com
Well this morning I tried Ubuntu with Rails from Turnkey and wasn't happy with the results. It wouldn't talk to the internet via the VM Player. Went back to Lubuntu and the internet was fine. 

Honestly this whole thing has been a lot of work. My typical experience with Linux over the past few days has been: 

- "Next I need to get X going." 
- look it up on the internet
- try command a command or set of commands 
- command fails 
- look up why command is failing
- hour later, command that I'm running to get the first command (or second etc) may or may not be working

The most important thing I've learned: filter your internet searches by date! For instance, I needed to install Ruby 1.9. So I search and find this: http://www.rubyinside.com/how-to-install-ruby-1-9-2-and-rails-3-0-on-ubuntu-10-10-4148.html. Ok it's within the past year, seems like it should be fine. Well, I get to the second command and it fails. Turns out the script that that guy recommended had been deprecated. Blerg. Very typical of my experience -- things evolve quickly in the linux world and they don't seem real big on backcompat. 

The thing that amazes me is that Macs -- which really do have "it just works" -- are built on top of unix/linux. The fact that Apple took "run this obscure and nearly impossible to remember set of commands" to get things going and turned it into "drag from here to here, hit ok maybe a couple of times and you're done" -- well that's really something. 

Adron Hall

unread,
Dec 5, 2011, 12:20:33 PM12/5/11
to pdxalt...@googlegroups.com
As for the Mac comment - I agree 100%. Not only did they make it stupidly usable, the less I think about it the easier it is to use OS-X, they left 99% of the *nix awesomeness; stability, security, and other elements in place. The only thing I'd like is apt-get. Truly impressive, but I've started to expect this from Apple + OSS. Even though Apple is still freakin' evil (like our favorite MS), they have design and usability down really well.

The date search idea is super important, good call! Of course, the reason most of those things change is the same reason Rails has been much more focused and developed for the past 5 years or so. With something that moves so fast and is one of the key drivers of web development technology (including what appears to be the driver of actual advancement for .NET these days) one has to really keep track of what is going on in that realm, it's tough, but it does pay off over time. :)

This idea to setup Linux & such to build Rails apps, why not go the PaaS route instead?  Heroku, EngineYard, etc are all a single command (or sometime no command, it just happens whenever you push) to get something deployed. Taking on the role of learning a whole slew of stuff, on a system that has decades of robustness and thus things that might seem complex, but are actually simple, adds a HUGE overhead to getting apps built. At least, I feel I'm in the same boat with *nix most of the time, but it doesn't really seem difficult to get info on it (vs. Windows, when a solution doesn't exist, it doesn't exist until Microsoft ships a feature or feature fix). However I still avoid most of the actual systems stuff and just go PaaS route so I can focus on app dev vs. ops management/system admin stuff...  thus I'm curious as to why you're focusing on that vs. the app dev part?

Cheers! - Adron


Justin Collum

unread,
Dec 5, 2011, 12:43:05 PM12/5/11
to pdxalt...@googlegroups.com
My concern with PaaS is that I'd be paying for time that I'm spending figuring out what the F I'm doing and trust me there's plenty of that in my world. Heroku is free but it seems like it's 'unusual' enough and different enough from my final destination (EngineYard) that it seems like it might be more trouble than it's worth. I don't have much information to go on there though. 

My plan was this: develop the app on Windows, get a linux vm that closely matches my final destination, get the app running on the vm, repeat 1 and 2 until I'm confident that it'll work, deploy to cloud host. Right now the app is running reasonably well, so I'm trying to get my linux env up and running. It's way more work than I thought it would be. Surprisingly, getting Rails going on Windows was far far easier. I started with Bitnami's Ruby/Rails stack but had enough issues (the VM player didn't seem to get along with it) that I decided to scrap it and go with what VMWare recommended (Lubuntu) after I talked to EngineYard. That went reasonably well, but I'm still fighting with it. My current issue is: 

usr/share/ruby-rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require': cannot load such file -- openssl (LoadError)

But I just installed openssl 5 mins ago. So I get to figure out what's going on there. And so on. 

Adron Hall

unread,
Dec 5, 2011, 1:34:36 PM12/5/11
to pdxalt...@googlegroups.com
Weird, I had the opposite problem.

Windows took a bunch of hacking around to get it working right. Still only about an hour. However the second time I installed it on Windows it worked flawlessly. Probably 5 minutes, 10 at the most? I did understand that I didn't get rvm goodness and a lot of other things that I was used to working with on *nix this time and that helped.

Linux took me about 4 minutes, but only after I realized that using the Ubuntu distro of Rails/Ruby was a BAD BAD idea. Go straight to the source and get it the way it's advised on the site. Then you get rvm goodness, straight clean built ruby, rails latest and greatest, etc.  ...and seriously, it shouldn't take but 4 minutes on most machines, even if you do the build for Ruby.  :)

Mac was easy too. Again, probably about 4 minutes of actual work. I did go back and get the latest of Ruby and other things and do a local build. Doing a make just makes things work better.

Overall, in all three environments, getting Ruby on Rails up and running with Rubymine took about 1/8th to 1/10th the amount of time it takes to actually get VS2010 + services packs and such installed, heaven forbid there is an OS install included. So I was super happy with that...

If your end point is EngineYard, you ought to just sign up for a free account and do a test deploy whenever you want to. There are enough hours in one of those accounts to get either done or really close to done.  ...at least I'd think.  :)  I've used it to deploy several apps and dev environments now, for teams that have almost zero knowledge of *nix itself, they're all happy Mac users doing easy scaffoldy and hacky dev w/ Ruby on Rails.  One group was actually advanced, but they didn't want to mess with actual sys admin stuff. I'm working on getting better at sys admin w/ *nix and am looking into chef, puppet, etc, but overall I'm rusty as hell with *nix.  :(

Your plan is good IMHO. You're doing what I did then, which is not to take the easy route. It's more pain, but once you get used to it, it's pretty easy, sometimes I'd argue far easier than even .NET dev/deployment. Especially for complex architectures, migrations, etc., etc!  

Just adding my 2 cents...  
Adron

Justin Collum

unread,
Dec 6, 2011, 1:38:16 PM12/6/11
to pdxalt...@googlegroups.com
OK I started fresh with a new Ubuntu 11.04 this morning. I documented all my steps. In the end, when I type "rails" at a command prompt I get "rails is not currently installed". Read this post http://stackoverflow.com/questions/8351229/cant-use-rails, did a few things, same result. Read several other pages about rails failing to install, did more things, same result. 

In the end, 1.25 hours burned up, no rails installed. 

This is the antithesis of "It Just Works". It's "It might work after you hack away at it, try a few things etc."

Frustrating. 

Ryan Eastabrook

unread,
Dec 6, 2011, 1:39:54 PM12/6/11
to pdxalt...@googlegroups.com

You likely need to tell RVM to use a certain version of rails as the default.

 

http://beginrescueend.com/rubies/default/

Ryan Eastabrook

unread,
Dec 6, 2011, 1:43:36 PM12/6/11
to pdxalt...@googlegroups.com

Of course, I should have prefaced this comment with, “if you have RVM installed”. I just ran into this yesterday, and setting a default RVM cleared it all up.

 

From: Ryan Eastabrook [mailto:ry...@mantratechnology.com]
Sent: Tuesday, December 06, 2011 10:40 AM
To: 'pdxalt...@googlegroups.com'
Subject: RE: [pdxalt.net] ubuntu with mongodb vm needed

 

You likely need to tell RVM to use a certain version of rails as the default.

 

http://beginrescueend.com/rubies/default/

 

From: pdxalt...@googlegroups.com [mailto:pdxalt...@googlegroups.com] On Behalf Of Justin Collum
Sent: Tuesday, December 06, 2011 10:38 AM
To: pdxalt...@googlegroups.com
Subject: Re: [pdxalt.net] ubuntu with mongodb vm needed

 

OK I started fresh with a new Ubuntu 11.04 this morning. I documented all my steps. In the end, when I type "rails" at a command prompt I get "rails is not currently installed". Read this post http://stackoverflow.com/questions/8351229/cant-use-rails, did a few things, same result. Read several other pages about rails failing to install, did more things, same result. 

Justin Collum

unread,
Dec 6, 2011, 1:45:36 PM12/6/11
to pdxalt...@googlegroups.com
Setting up rvm was Step 3-5 (had to edit .bashrc to get the rvm command at the command line). 

Ryan Eastabrook

unread,
Dec 6, 2011, 1:47:38 PM12/6/11
to pdxalt...@googlegroups.com

Yes, I had to do that too. However, until I set the default for RVM, every new terminal opened would give me a ruby and/or rails error.

Adron Hall

unread,
Dec 6, 2011, 4:55:00 PM12/6/11
to pdxalt...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages