Tag: ruby on rails

Heroku thinks app is in same folder

I referenced this awesome thread from the following to fork my Heroku app and clone the github repo to have two seperate github repo’s and Heroku app’s for production and development. Trying to heroku git:clone after heroku fork yields an empty repository $ git clone git@heroku.com:oldapp.git -o old newclonedapp $ cd newclonedapp $ heroku git:remote […]

Hide Plain Text Password in development.rb

In order to set up actionmailer/devise confirmation email I need to provide the details to a real gmail account: config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address: ‘smtp.gmail.com’, port: 587, domain: ‘example.com’, user_name: ‘gmailaccount@gmail.com’, password: ‘gmailpassword’, authentication: ‘plain’, enable_starttls_auto: true } But if I commit this file on github on a public repository it will be […]

rake db:reset ignores changes to migration

I have a migration that specifies a mySQL column size: class CreateEntities < ActiveRecord::Migration def change create_table :entities do |t| … t.string :telephone, limit: 50 … end end end Originally, this limit was 20. I can’t seem to get this new limit to be applied to the database. I have tried: > rake db:reset also […]

git commit creates assets and temporary files for some reason

Whenever I run git commit -m “blah”, my apps are creating a bunch of random files, for some reason. This is causing a problem because it is taking up lots of space on my server and my git push heroku master command will timeout. What is happening? Below is the output from my last commit […]

Rails – how to start up a local server (thin) with a specific git branch

I have a Rails 3.2.16 app with multiple git branches (for testing features). I use thin to spin up a server in development. If I have a branch called “dev” for instance and I’m currently checked out to that branch in git. By default thinwill pickup whatever is in the app directory and serve it […]

Can't push to Heroku (non-fast-forward)

I’m having troubles pushing some code to Heroku. I’m still in the process of learning how all of these tools work, so I’m going to paste what I just did. saasbook@saasbook:~/typo$ git status # On branch master # Your branch is ahead of ‘origin/master’ by 1 commit. # # Changes not staged for commit: # […]

Could not load database configuration. No such file – database.yml – OpsWorks

I’m deploying for first time my application using OpsWorks (Ubuntu 14.04) and when the migration is running I’m getting this error: Could not load database configuration. No such file – /srv/www/todoapp/releases/20150122121517/config/database.yml I don’t understand this error because I have a /config/database.yml in my rails application and is being pushed to bitbucket correctly. You can see […]

Ruby on Rails: Bad connection with PG after running rake:db migrate

Recently I forked and cloned a repo I am contributing to and when I run rails s I get no errors, however when I run rake db:migrate I get this. rake aborted! PG::ConnectionBad: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket […]

Rails 4 + Capistrano 3 – Deploy to Production Server from Local Repo

I’m using Windows 10 and Cygwin, and I am setting up Capistrano 3 for deployment to my production environment. I believe I have everything set up correctly, but I can’t figure out how to push my local repo to my production server. I don’t have my repo on GitHub or another such site and would […]

Unable to deploy with rails and capistrano, “HEAD is not the same as origin/master”

I keep getting an error when trying to deploy with capistrano to my remote server. It is telling me that my local files aren’t synced up to the remote repo, but when I git push I get the Everything is up-to-date message. I’m not sure what the problem is. I’ve also checked the rev-parse for […]

Git Baby is a git and github fan, let's start git clone.