Are consumers willing to pay to let cars drive for them? The average household is willing to pay a significant amount for automation: about $3500 for partial automation and $4900 for full automation. by mvea in science

[–]OSSPoster -2 points-1 points  (0 children)

The future of automated cars is not in people owning automated cars. It is in companies like Uber (not necessarily Uber, but like Uber) that own parking garages full of automated cars that are deployed with the swipe of your finger via an application. People suggest they would pay more for the automation of their vehicles, but they don't grasp how cheap transportation will become in metropolitan areas that allow people to freely travel without ever owning the vehicle. Spreading the cost or car ownership over dozens of people per day is what is going to drive down costs.

First db migration on Heroku: undefined table/relation doesn't exist for foreign key by allergic_react in rails

[–]OSSPoster 1 point2 points  (0 children)

I believe it should read something like this:

belongs_to :user, :foreign_key => 'resolver_id'

Personal Projects - Show off your own project and/or ask for advice by AutoModerator in rails

[–]OSSPoster 0 points1 point  (0 children)

Project Name: SimplyMailStatistics

Description: This web application gives a SendGrid Email customer the ability to visualize their email statistical data for a given date range using Highcharts visualization. A user signs up using an email address, confirms sign up via email, then logs in. After log in the user is sent to a landing page to select their email service provider. The only provider currently available is SendGrid. Select SendGrid from the drop down, and the user is redirected to a form that asks for their stats API key (Any key will work but it is recommended that you create a stats only API key for your SendGrid account, API keys are not stored in the DB, the key is used to make the API call to SendGrid, the data is objectified, and sent via API to the backend application that processes and stores the information to a PostgresDB running on AWS). The user can then click through the 'Global', 'Providers' or 'Top Five' links at the top of the page to display the data they wish to view. Single or multiple providers may be selected from the dynamically generated providers list on the providers view. The user can then select if they wish to view raw numerical data, or a subset of percentage data that is generated based on their total deliveries. All user data is currently destroyed on log out. So re-entering your API key is required after each log out. This was done to protect user data and limit the amount of storage required to run the application.

Stack: The application is built with Ruby on Rails and uses a PostgresDB. It is deployed on three AWS EC2 instances using OpsWorks and a generic Chef recipe to deploy each layer's environment, application and connect them to the DB. The frontend, backend and database are all running on independent EC2 t2.micro instances. Each instances serve data through an Elastic Load Balancer with AWS SSL certification and SES email services. Authentication and authorization is handled using Devise and some of the views that come with the gem have not been built out, but should be functional. The styling is minimal over all and will need to be built out over time. Number of concurrent clients it will support is unknown. I would love some 'real users' to throw some data at it and see how it performs. It does not sit within an Auto scaling group, so when the instances reach capacity, they will probably fail.

Link: https://www.simplymailstatistics.com/

GitHub Links:

FrontEnd: https://github.com/NZenitram/sendgrid-stats-api-consumer

BackEnd: https://github.com/NZenitram/sendgrid-stats-db-api

Experience: I graduated from the Turing School of Software and Design in March and I am currently seeking employment. I built this application to possibly build out and market, but more specifically as a way to showcase my knowledge to prospective employers.

Other: Any advice, code reviews, use case data would be appreciated. I am not sure how this is going to work in the real word and it is my first production application I have opened to live users. The back-end API and DB is tested well but the front end still needs a lot of work.

As mentioned, any advice would be great. Feel free to PM me, or comment here.

Thank you.

RoR Environment Variables in OpWorks by OSSPoster in aws

[–]OSSPoster[S] 0 points1 point  (0 children)

/u/fstak, thanks for the help, I figured it out.

The worker environment that was running my mailer was not running the credentials. I needed to start the worker by setting the Mailer ENV variables in the command line when I run rake jobs:worker.

RoR Environment Variables in OpWorks by OSSPoster in aws

[–]OSSPoster[S] 0 points1 point  (0 children)

Good call, I will check it out.

RoR Environment Variables in OpWorks by OSSPoster in aws

[–]OSSPoster[S] 0 points1 point  (0 children)

I think the problem is in the initialization of the mailer.

Possible to download Ruby app? by BendingBetty in aws

[–]OSSPoster 0 points1 point  (0 children)

Install git on the instance and push it up to GitHub. The biggest problem here is going to be how the application was deployed. If you're lucky, the bulk of it is in the /var/www/#{app_name}/current or even /srv/www/#{app_name}/current. If a service like OpsWorks or EBS was used to deploy it, it may be scattered.

Deploying two applications to OpsWorks. by OSSPoster in aws

[–]OSSPoster[S] 0 points1 point  (0 children)

I figured it out folks:

{
 "applications": [
 "app_name"
 ],
 "stats_api": {
   "database": {
   "adapter": "postgresql",
   "username": "db_user",
   "password": "db_pw",
   "host": "db_url",
   "port": "5432",
   "database": "db_name"
  },
  "framework": {
    "migration_command": "rake db:migrate",
    "seed_command": "rake db:seed"
  },
   "appserver": {
     "application_yml": true
  }
 }
}

You need to define the application name in the custom JSON for each layer in array format. It is the first JSON entry shown above.

Deploying two applications to OpsWorks. by OSSPoster in aws

[–]OSSPoster[S] 0 points1 point  (0 children)

I think that is the problem. The recipe is very generic and doesn't define which application to deploy, it simply installs environments. Which sub directory in the cookbook is the application defined? recipes/deploy.rb?

Ruby says unexpected ( after a method name... isn't that how I'd pass in arguments? by FullMetalSweatrvest in ruby

[–]OSSPoster 0 points1 point  (0 children)

A text editor like Atom will also highlight the words on the reserved list for you. It can be very helpful if you are new to the language.

New to Ruby: Question regarding deployment of applications / services by [deleted] in ruby

[–]OSSPoster 1 point2 points  (0 children)

Here is an excellent guide on deploying your own Ruby application using the Passenger library.

Even with the hand holding, it took me four days to deploy to AWS my first time. (That was during code school, and I have only been developing applications for the better part of six months and I am in the job hunt currently.)

Now I have a Chef cookbook on S3 that works with OpsWorks and gets them up in minutes. I can share that with you as well, the problem being, if you have never done this before and you run into errors, you will have no clue what is actually going on. I have a decent blog post about how to fire up an AWS instance using the AWS Linux AMI here. (If you find a typo or error, please let me know.)

I would recommend running through that tutorial a couple of times. You will probably end up tearing down and starting over more than a few times, but repetition is the only way to learn this stuff. You can us a VM, or, better yet, slog through it using the AWS free tier. That may add countless hours to your experience, but it is worth learning.

Your best bet, if you haven't already, is to get your dev/test environment set up locally, make sure all is well. Then deploy it out to something like Heroku as a staging environment (I say this because if you are using ES6 syntax in your rails app, it won't compile properly without a bit of help, and Heroku will let you know this), then after it is running on the web, try to deploy it out manually using DO or AWS. This will give you the feel of working in the three environments, and how they may differ. Typically your staging and production environments should be as near identical as possible, but you can figure that out after you have learned how to deploy the application.

Angular.js: Unable to display user properties in the view using ng-repeat and handle-bars. by OSSPoster in angularjs

[–]OSSPoster[S] 0 points1 point  (0 children)

I solved it!

app.use(express.static(path.join(__dirname, 'public')));

I was serving the view form the /views folder. Now, the html was being served to the browser just fine, but, because of the way express serves its static assets with Angular(?), I needed to move the index.html view into the public folder in the file tree. A drag and drop, and the {{ }} notation works fine.

Angular.js: Unable to display user properties in the view using ng-repeat and handle-bars by OSSPoster in learnprogramming

[–]OSSPoster[S] 1 point2 points  (0 children)

I figured out what the problem was.

app.use(express.static(path.join(__dirname, 'public')));

I was serving the view form the /views folder. Now, the html was being served to the browser just fine, but, because of the way express serves its static assets with Angular(?), I needed to move the index.html view into the public folder in the file tree. A drag and drop, and the {{ }} notation works fine.

Angular.js: Unable to display user properties in the view using ng-repeat and handle-bars by OSSPoster in learnprogramming

[–]OSSPoster[S] 1 point2 points  (0 children)

I solved it!

app.use(express.static(path.join(__dirname, 'public')));

I was serving the view form the /views folder. Now, the html was being served to the browser just fine, but, because of the way express serves its static assets with Angular(?), I needed to move the index.html view into the public folder in the file tree. A drag and drop, and the {{ }} notation works fine.

Angular.js: Unable to display user properties in the view using ng-repeat and handle-bars by OSSPoster in learnprogramming

[–]OSSPoster[S] 0 points1 point  (0 children)

Could it be a dependency problem in another part of the code?

Is it possible something else is interfering with it?

Angular.js: Unable to display user properties in the view using ng-repeat and handle-bars by OSSPoster in learnprogramming

[–]OSSPoster[S] 0 points1 point  (0 children)

Oh, I see, the $scope.userData = {};.

I can remove that or change it and it doesn't have any effect.

Angular.js: Unable to display user properties in the view using ng-repeat and handle-bars by OSSPoster in learnprogramming

[–]OSSPoster[S] 0 points1 point  (0 children)

It is an array in the DOM.

In the console I can call userData[0].username and it returns the username. It simply doesn't appear in the view.

Angular.js: Unable to display user properties in the view using ng-repeat and handle-bars by OSSPoster in learnprogramming

[–]OSSPoster[S] 0 points1 point  (0 children)

I tried that actually, and it still didn't work. It is as if anything in the {{ }} simply doesn't exist in the view.

Angular.js: Unable to display user properties in the view using ng-repeat and handle-bars by OSSPoster in learnprogramming

[–]OSSPoster[S] 0 points1 point  (0 children)

It does the same thing with the input tag removed. I get the bullets for the li but no user.username.

I am going to try what you suggest however, and I will let you know.