Friday, October 25, 2013

Urban Ephemera 10/25/13

Got lots accomplished today.  I deployed the program to Heroku today.  The major complication was dealing with the fact that my background images were not showing up.  I fixed this with image-path:

background-image: url(image-path('IMG_0003.png'));

Users can now make Stores.  The pages used to generate new Users and Stores are fully stylized with Bootstrap and raw CSS.  I now need Users to make Reviews that are owned by both Users and Stores.

I am using Thin for my web server instead of Webrick.  Thin is more robust in a production environment.

Christophers-MacBook-Pro:urban_ephemera christopherspears$ rails s
=> Booting Thin
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server

Added this to my Gemfile:

group :production do
  gem 'rails_12factor'
  gem 'thin'
end

The gem 'rails_12factor' should fix most of the asset pipeline issues.

Changed the command used to launch my web process by creating Procfile:

web: bundle exec thin start -p $PORT -e $RACK_ENV

Thursday, October 24, 2013

Urban Ephemera 10/24/13

Finally got the login working.  When the program launches, the user sees the authentication page because it has been set to root.  If the user does not exist in the db, I use a redirect to push the user to the page used to create new users.  After a new user is entered, I use the redirect to send the user back to root.  Along the way, I use the params function to pass the username value around so the username text field is autofilled.

Removing Turbolinks from your Ruby on Rails project

I was having major issues implementing a login in Ruby on Rails.  I ended up removing Turbolinks from my project:

In the Gemfile:

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# gem 'turbolinks'

I then went into app/assets/javascripts/application.js and removed it there.

Apparently Turbolinks uses caching to speed up loading up webpages.

Tuesday, October 22, 2013

Testing on iPhone: xip.io

Might use this to test Urban Ephemera on my iPhone C: http://xip.io/

Monday, October 21, 2013

Urban Ephemera Oct 21, 2013

Added Store models, controllers, and views.  Modified the controllers and views on Users and Reviews, so no database entries can be made with the models for those classes.  Still have not figured out to create relationships between all of the classes.  Users should be able to make Stores and Reviews, and fields in Reviews should modify fields in Users and Stores.  Hopefully, we will get into this later in the week.

Sunday, October 20, 2013

Starting Urban Ephemera

I'm going to start recording my work on my second WDI project!  Really excited to start my first Ruby on Rails app.

Name: Urban Ephemera
This app will allow the user to locate and review indie bookstores and record stores. The data points will come from users. In the future, the app can be expanded to include coffehouses, art house movie theaters, used clothing stores, etc.
Features (in order of implementation): 
1. Log in and password verification 
2. Drop down menu that filters results 
3. Type in your location and bring up map with stores. 
4. Type in a store name and bring up map with store's location. 
5. Click on a store's marker once and get a little box with the store's name, speciality, and rating. 
6. Dbl click on a store's marker and get a page with a store's name, rating (incuding number of reviews), contact info, store speciality, and photo. Underneath this info will be a list of reviews. 
7. Click on the Review button on the first page and bring up a form where the user can type in a store's name, contact info, speciality, and review of the store. The user can upload a photo as well.

Here is what I have accomplished today.

Front End:

Downloaded, optimized, and resized photos.  Worked on the mockup for the index page.  Been testing the page on the iOS simulator.  Might want to add a header to the page.

To do:

  • mockups of other pages (map, page of reviews of a store, submit review page)
  • figure out how to test my web app using my iPhone C
  • maybe resize to 320?  Right now the index page is bigger than the iPhone screen.
Back End:

Started implementing models, controllers, and views for the User and Review classes.

To do:
  • Implement models, controllers, and views for the Store class.
  • Figure out how to set the number_reviews field in User by looking at the number of reviews that user created.

Friday, October 18, 2013

After a morning of learning how Ruby works with MongoDB, I was really glad to do 30 minutes of yoga.  Started coughing out clean LA air.

Monday, October 14, 2013

Kind of surprised at how creative some of these tic tac toe project are!  Gonna have to bring my 'A' game!

Saturday, October 12, 2013

Completed my first General Assembly Project!  Wrote a tic tac toe game to be played by two players on two devices.  The game was written in HTML, CSS, and Javascript and used the Angular JS framework with Angular Fire providing the backend.  Looking forward to Ruby and Rails next week!

Friday, October 11, 2013

Wednesday, October 9, 2013

Started using Firebase with Angular today!  Check out http://angularfire.com/!

Friday, October 4, 2013






A diagram depicting routing in Angular JS!
Got the basic game play for my Tic Tac Toe game up and running.  This weekend I want to refactor my code and add an "about.html" page.  Time told me to check out newTic/app/scripts/app.js.  This will get me involved in routing with Angular.

Thursday, October 3, 2013

After programming for around 12 hours, I think I am starting to wrap my head around Angular.  Need a beer...

Tuesday, October 1, 2013

Learning AngularJS today!  This stuff is pretty cool!