I'm trying to deploy an app that has a dependency on uuid.h. During the bundle install portion of the git push heroku master I get (what seems to be the key part of the backtrace):
checking for uuid/uuid.h... no
checking for uuid.h... no
configure: error: Neither uuid/uuid.h nor uuid.h found - required for brass, chert and flint (you may need to install the uuid-dev, libuuid-devel or e2fsprogs-devel package)
Is there any way to get any of those libraries installed on the server? I'm guessing not by my own power, but just thought I'd ask.
If you're on the cedar stack, you can vendor in anything you want. It may not always be easy, but you'll be able to do it. Check out https://github.com/heroku/vulcan and projects on the heroku github account that have the word buildpack for inspiration.
Related
I hope this question is suitable for this forum, I'm still learning what's deemed fit and what isn't. Anyway here is my question, a lot of places seem to state I need to install homebrew on my mac to install rails, do I really need to and what benefits does it offer to do so and for the development environment?
This question is pretty bad but I remember when I started programming that I had a similar question, so here we go:
How do you install stuff on your computer? Obviously you use the Mac App Store if you want something from Apple, and if you want to install Chrome just go the Google Chrome website etc.
But when you want some kind of programmer tool, let's say a compiler. How do you install this? Either you go to their website, download a tarball with the source code, compile it from scratch and bind the necessary environment variables. Or you are unlucky and the compiler has a bunch of dependencies so you have to download them first.
Then some geniuses thought that "Oh damn, that's a pain", so instead they created so called package managers, so now when I want Rails on my computer, I just installed it through the "gem" ruby package/dependency manager.
So you can install rails through the command "gem" (just google "ruby gem") and you'll see what it is, but I advise you to if you want to have a nice development environment where it's easy to install and uninstall stuff, use brew or macports.
Title says it all.
If I understand correctly, the Heroku VM environment provides some built-in binaries and then additional ones can be provided in a custom build pak.
Trial (by building a little test app) and error (by having the build fail) is the only way forward so far. Surely there's a better way.
I have read the Heroku docs and looked in obvious places in the Ruby build pak source. No list.
My immediate aim is to determine if a Rails app that requires GD2 graphics (the gd2-ruby gem) will build without a custom build pak. But the general question of binaries availability comes up again and again.
Run heroku run bash, and get a shell in a plain dyno. Then list all rpms installed by invoking dpkg --get-selections, as for example here: https://askubuntu.com/questions/17823/how-to-list-all-installed-packages or here: http://www.howtogeek.com/howto/linux/show-the-list-of-installed-packages-on-ubuntu-or-debian/
I was reading a blog post about installing git, and it says it will be installed in /usr/bin/git
When I check my version using $ which git, terminal shows /usr/local/bin/git. Same result when I checked for Ruby. Does it make different where Git, Ruby or Rails are installed? Can I change that if it's possible?
Normally, it should not matter. But, usually, /usr/local/bin is ahead of /usr/bin in the PATH environment variable. So, in future, if another version of the same software, lets say git, is installed into /usr/local/bin, that will take precedence over the one installed in /usr/bin. You can of course manipulate your PATH environment variable to suite your needs.
run this command to see if multiple versions of git have been installed
which -a git
It does not matter as long as all of them are accessible in your PATH for commands.
Is your concern about where the actual repositories will be located - the place where GIT repositories are located is not necessarily the same place where GIT itself is installed.
You probably could change it. It might not be worth it.
It will probably be easier just to leave it and remember.
This is sorta like windows install path. Default will be "Program Files" but it often can be changed.
Note that different versions of Windows have differently named program files. This can be an example of such differences also.
Finally it could be that your ruby installed GIT, and that is the path that Ruby chose.
As long as /usr/local/bin/git is in your PATH you should not notice any differences.
What is the preferred method of exporting a homebrew environment so I can synchronize my workspace between computers? Seems like there should be something similar to composer.lock or pip freeze. Is there a better way than brew list > brews.txt?
There is a better way: brew leaves.
This command prints a simple list of installed formulae which are not dependencies of any other formulae. Essentially this lists everything that was manually installed or is a leftover dependency from a removed formula.
$ brew leaves
apple-gcc42
bash-completion
brew-cask
git
[...]
There's no built-in means of using brew leaves output to install, but just having a clean list of manually-installed formulae is a step in the right direction.
Thanks to this Gabe Berke-Williams for writing about this: http://robots.thoughtbot.com/brew-leaves
Homebrew Bundle seems like a pretty great solution.
There is not a better way, and there are no current plans to make one.
Source: https://github.com/mxcl/homebrew/issues/17771
Use git! Maintaining repos for environment setup scripts is a pretty slick approach.
I highly recommend using a script to set up a development environment in the first place. thoughtbot has a really lightweight approach that provisions a development environment, including a bunch of brew formulas. https://github.com/thoughtbot/laptop. GitHub just open sourced boxen for this (and much more), but it has a somewhat steeper learning curve.
As you can see from the thoughtbot/latop readme, the entire install is a one-liner. If you want different packages, fork the repo and add whatever you use. This only covers the initial install, but it is a fantastic start.
For ongoing synchronization of development environments, including updating your preferred homebrew setup, you might want to try a 'dotfiles' approach. Zach Holman has a great approach detailed here: https://github.com/holman/dotfiles
If you want to tweak or update anything, just make the appropriate changes to the script (holman's dot script does the ongoing update stuff). Commit, push, pull down from any other environments.
What do I need to do if I want to use https://github.com/holden/devise-omniauth-example as my starting point for my app?
I'm developing on OSx and I'm a noob. I'd like to start with a pre-built auth system and go from there. New to git too--I think I want to pull from git? or start a new rails app as a template?
To use that. You need to install git. Check out homebrew to install git, makes life easier.
Next do
git clone https://github.com/holden/devise-omniauth-example.git
cd devise-omniauth-example
and you are good to go after changing some configs, mostly db.
I would recommend starting from scratch and reading about devise. It may take a bit longer, but will make life easier in the long run.
In command line:
git clone git://github.com/holden/devise-omniauth-example.git
This will download the whole app you'll be able to use after configuring your database and having bundled the gemfile.