Tag: ruby

How to push local postgresql database built on rails to heroku?

I have some data in my postgresql database that I entered using a very simple rails app. I deployed it to heroku and now am trying to send my local database to heroku because its very empty right now. At first I thought doing heroku run rake db:migrate would actually do this but turns out […]

Github pulling does not work in – Rails 5

I’m trying to pull last commit that I made on github, and though I get no errors, I see no changes in the code. I messed up my schema file, but after I pull the code it does not change at all. I searched here on stack and the solution that worked for others didn’t […]

git – update to new branch of rails

I currently have a rails project running of a git tag v2.1.2, to get here id did git checkout v2.1.2 However there are now new fix’s that have been applied to the 2.1 branch, how do I move to this branch rather than the tag?

Grit commit seems to be overriding last commit in Git repo?

I’m using Grit to create a repo and committing as few times. Every time I commit, my commit is saved, but the old one disappears. Anyone have any clue what I’m doing wrong? First I create a repo and make a commit. If I log the commit, I get the commit ID, and everything works […]

git-commit-notifier with gmail

First of all you have to know I’m total Ruby noob 🙂 I installed git-commit-notifier (http://github.com/ilozka/git-commit-notifier) on my system (Ubuntu 10.04) and followed all the installation instructions but every time I push to my git repository I get this error message: remote: Sending mail… remote: /usr/lib/ruby/1.8/net/smtp.rb:944:in `check_auth_response’: 530 5.7.0 Must issue a STARTTLS command first. […]

How to get the last commit date of a file with ruby/grit?

I have a jekyll site, and I want to find the last commit date of a certain post using ruby/grit. I know that I can do the following using git: git log -1 –format=”%cd” — <file> How can I do something equivalent using ruby/grit please?

Shell Script Sequencing with Rake

I am working on a rake utility and want to implement something mentioned below: There are some shell commands in a sequence in my Rake file. What I want is that the sequence should wait for the previous command to finish processing before it moves to the next one. sh “git commit -m \”#{args.commit_message}\”” do […]

Trying to update git submodule with Ruby, how to chdir before executing shell command?

I have some git repo X that has a submodule in the subfolder foo/bar pointing to repo Y. I’m trying to get my CI system to update the submodule automatically, I mean pursuing this commands from RAKE: $ cd foo/bar $ git pull origin master But when my RAKE task tries to perform this, it […]

Can't connect to localhost:3000 after creating Rails project

I recently installed Ruby and then installed Rails. I used the some tutorial as a guide for installing with the commands: sudo apt-get update sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs Then using rbenv: cd git clone https://github.com/rbenv/rbenv.git ~/.rbenv echo ‘export PATH=”$HOME/.rbenv/bin:$PATH”‘ >> ~/.bashrc […]

Sad story – git+ssh+ruby

Problem: i need to verify git repo properties (ssh key,repo url) in ruby solutions: 1) write ssh key into ~/.ssh/id_rsa file and execute git clone command with repo url property – easiest way cause race conditions when multiple users trying to check theirs repos. 2) write key into any file and link server and key […]

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