Skip to content

Instantly share code, notes, and snippets.

@mraaroncruz
Created October 8, 2012 09:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mraaroncruz/3851719 to your computer and use it in GitHub Desktop.
Save mraaroncruz/3851719 to your computer and use it in GitHub Desktop.
granadajs Hacknight Uno

Granadajs Hacknight Uno

Ideas for app

  • Shopping - a shopping list app, maybe with phonegap. Web/phone sync.
  • Tapatracker - categorize, describe, photos?, location tapa tracker. "Do I want asian noodles or oxtail? I'll check tapatracker!"
  • Unlikeable - a facebook app that checks which of your friends liked things that you disliked. I don't know if this is possible. It probably is.
  • SoundCloud playlist creator
@mraaroncruz
Copy link
Author

I just created and pushed the scaffold of an app. https://github.com/granadajs/tapatracker-server
Installation

  • Have ruby 1.9.2 or greater installed on your system
  • on the command line run gem install bundler
  • git clone git@github.com:granadajs/tapatracker-server.git
  • cd tapatracker-server
  • bundle install
  • bundle exec rake db:migrate
  • bundle exec unicorn_rails -p 3000
  • navigate to http://localhost:3000 in your browser.

You need SQLite3 installed on your system for this to run. I picked this database because it is usually pretty worry free to install, I have had issues getting postgresql installed on some people's systems.
If you are on windows, this probably won't work. I can help you if you need more instructions.
If you are on OSX, you will probably need to install XCode followed by a packaging manager like homebrew where you can then run brew install sqlite3.

@mraaroncruz
Copy link
Author

@opsb I set it up with capybara-webkit a headless webkit lib instead of poltergeist. Poltergeist is commented out in the Gemfile as well as in spec/spec_helper.rb if you want to switch. It doesn't matter to me, this is how my setup normally is.
You should add spinach too.
You will also see that I set the project up with haml. I use slim but thought I would pick something that more devs might know.
If anyone thinks it would be better to use ERB, that is fine. At this point my brain won't let me pick it as a default.
Compass and Twitter bootstrap are also installed. I like to do this to slowly ween myself off of bootstrap as the app develops. If anyone thinks this is overkill, let me know or just pull something out :D
Another thing is that I use a combination of guard and spork to make my testing cycles nicer. I also have included a spec/spec_helper_lite.rb file which doesn't load the rails framework. You can require it directly from your spec and then require the file that you are testing. It also has some sugar to require common file paths like lib or models.
I will drink less coffee for the rest of the week...

@opsb
Copy link

opsb commented Oct 8, 2012

You have been busy... I've always used erb myself, just looked at slim though and I really like the syntax so that would be my choice.

@vemv
Copy link

vemv commented Oct 8, 2012

I'm fairly new to Rails so I'd feel more comfortable with ERB (and as few plugins as reasonably possible in general)

@opsb
Copy link

opsb commented Oct 8, 2012

I'm happy sticking with erb for this one. We can always move onto slim for future projects.

@opsb
Copy link

opsb commented Oct 8, 2012

@pferdefleisch I've only got read only access to the tapatracker-server repo, can you bump my permissions.

@mraaroncruz
Copy link
Author

@opsb
crap, i guess i have to add permissions on a per project basis. Lame.
On another note, I installed Devise but didn't add any oauth stuff. If you want to handle that, it would be greatly appreciated.

@vemv cool, we'll switch it to ERB.

You both should have push/pull access now.

@mraaroncruz
Copy link
Author

I think I may push out a couple balsamiq wireframes by the end of the day. I will link to them here.
And I will be at Buzz tomorrow if anyone else feels like showing up. Have to get some "real" work done too though :)

@opsb
Copy link

opsb commented Oct 8, 2012

I need to go into Buzz tomorrow, (need a spanish speaker to sort out my iranian passport for me...). I'll probably go in for the morning and stay around for lunch.

@opsb
Copy link

opsb commented Oct 8, 2012

If everyone's on dropbox that would be a good place to keep balsamiq mockups etc.

@mraaroncruz
Copy link
Author

I just created a dropbox shared folder and added @OPSD
@Others you can send me your email at hello@granadajs.com. I will share the folder with you when I get your email address

@mraaroncruz
Copy link
Author

@vemv I updated the repo, removing HAML. As I wrote earlier, you should have push/pull access now

@mraaroncruz
Copy link
Author

I just created a dropbox shared folder and added @OPSD
@opsb oops.

@vemv
Copy link

vemv commented Oct 8, 2012

thanks Aaron for keeping it simple for me :)

getting RoR running via RVM. is that the way to go?

@mraaroncruz
Copy link
Author

@vemv I use rbenv but there is probably more docs on rvm. I use rbenv because there's less magic but it's a bit harder to install unless you are using OSX. If you're running OSX you can use homebrew and type brew install rbenv ruby-build and after they are installed rbenv install 1.9.3-p194 to get the latest ruby. The other way is to clone the rbenv repo into $HOME/.rbenv, then create a folder called $HOME/.rbenv/plugins then clone the ruby-build repo in there git clone git://github.com/sstephenson/ruby-build ~/.rbenv/plugins/

@mraaroncruz
Copy link
Author

For anyone interested on getting a bit of a head start on Angular.js, here are a few screencasts. Looks pretty interesting, I am looking forward to it.
http://www.youtube.com/watch?v=WuiHuZq_cg4&feature=BFa&list=PL173F1A311439C05D

@vemv
Copy link

vemv commented Oct 8, 2012

rbenv looks saner, will give it a try. managing versions particularly interests me because of JRuby - as a JVM guy I should try it out sooner or later.

@mraaroncruz
Copy link
Author

@vemv
Copy link

vemv commented Oct 9, 2012

Thanks! curious to know how for can one get in Ruby as for all things concurrency - that is one of my favorite topics in programming.

rbenv was pleasing to install. having to constanty run the rehash command sucks tho. http://www.stehem.net/2012/05/08/how-to-install-ruby-with-rbenv-on-ubuntu-12-04.html

@opsb
Copy link

opsb commented Oct 9, 2012

K, I've added in spinach add omniauth. There's a spinach scenario for signup in tapatracker-server/features/scenarios/. It's currently setup for facebook connect but it's easy to switch to any oauth provider. I've added Getting started instructions to readme, it tells you how to get set up with poltergeist and facebook connect.

@mraaroncruz
Copy link
Author

@vemv I find that I don't have to run rbenv rehash very often. I have aliased it to rr just in case but one must only run it when one installs new binaries which is mostly just on a new app generation or update.
I also have a bunch of bundler aliases like be, bu, bo etc. for bundle exec, bundle update, bundle open etc. I also have r aliased to bundle exec rails so I can do things like r g model Foo which I find saves me a lot of annoyances.

@mraaroncruz
Copy link
Author

@opsb great!

@mraaroncruz
Copy link
Author

@hcarreras I just added you to the organization.

@mraaroncruz
Copy link
Author

@hcarreras send me an email at hello@granadajs.com so I can add you to the dropbox (please).

@opsb
Copy link

opsb commented Oct 9, 2012

OK, after a couple of hours trying to get phonegap 2.0 to deploy to my iphone I gave up. 2.1 is the way forwards! I did a fresh install, set build options to Build Active Architecture Only and it worked first time.

@mraaroncruz
Copy link
Author

@opsb did it build in the simulator?

@mraaroncruz
Copy link
Author

@opsb I'll try on my mini

@opsb
Copy link

opsb commented Oct 9, 2012

2.0 built in the simulator but wouldn't deploy to my iphone. 2.1 seems a lot more stable so far. Been having a play and it seems solid.

@vemv
Copy link

vemv commented Oct 10, 2012

do I need this pow thing (I don't own a Mac) or can one get away without it? really don't know what is it exactly for.

@opsb
Copy link

opsb commented Oct 10, 2012

No, you don't need pow. It's looking like we're not going to use oauth as it's difficult to use with phone gap. We want to concentrate on adding the features for taking photos/rating tapas etc so we'll do something simpler (sign up with username/password etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment