Tag: ruby on rails

I pushed gemfile and gemfile.lock to my branch, do I have to merge to master?

I did a git add, git commit, and git push for 9 files (2 of those being Gemfile and Gemfile.lock). My team has informed me that we do not need Gemfile and gemfile.lock in the code review. What is the easiest way to revert these 2 files? (I would like to keep the other 7). […]

Get files from previous git commit

Sorry if this question sounds dumb. So, I am following Michael Hartl’s Rails Tutorial. Up to the end of chapter 8, everything was work fine. But I have made some mistakes during chapter 9 that I cannot figure out. So, I would like to go back to the commit I did at the end of […]

How are environmental variables safer than secrets.yml

In rails, the secrets.yml file has a default comment stating that you shouldn’t keep production secrets in the repository, and instead they should read the values from the environment. I have also read pretty much everywhere to keep you secret keys for various APIs in environment file to keep them safe. My question is, how […]

How I can resolve 502 error on Gitlab?

So, I try to install Gitlab and I have some problems. At the end of Installation from source, when I try to start all services, I have a 502 error. I have this message when I try sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production : Check GitLab API access: FAILED. code: 502 gitlab-shell […]

Ruby on Rails – bin files shebang causing issues (Mac)

So for the files in the /bin directory of a normal rails installation (bin/rails, bin/rake, bin/bundle), the shebang at the top of the file is: #!/usr/bin/env ruby.exe But when I run bin/rails, for example, I get the error: env: ruby.exe: No such file or directory When I remove the .exe from the end of the […]

Moved my bundle directory, so now it get's included in my GIT. Is there a wat to remove?

I moved my bundle directory for my ruby gems, but forgot to add the new directory to the .gitignore. So now my GIT is trying to push all the gems as well. I googled around, but I can’t find a way to reset my GIT or remove the new bundle directory from the index. Any […]

Bundle command not found while deploying rails app in aws using mina

While deploying my rails app using mina, I have got error like bash: line 82: bundle: command not found. I have googled but I could not find any solutions. How do I fix this? This is my deploy.rb require ‘mina/bundler’ require ‘mina/rails’ require ‘mina/git’ set :user, ‘ubuntu’ set :domain, ‘www.fuitter.com’ set :deploy_to, ‘/usr/share/nginx/html/fuitter’ set :repository, […]

How to deploy rails app + postgreSQL in Azure Ubuntu VM

I have an Azure subscription active and I want to migrate my rails app from Heroku to Azure, but it really overwhelms me and I don’t really know how to do it. What I want is the following: Move my rails app (REST Webservice API + static homepage) from Heroku to Azure. Use postgreSQL database […]

How to determine which commit and/or which branch was deployed to Heroku?

I have an app that is deployed to Heroku, and presume that I haven’t done the deployment, how can I check which branch was used to deploy to heroku, or what is the commit ID (as with it I can determine the branch if needed)? I am using GitHub. So far I have tried to […]

Extracting only open issues from github api without any pull request using ruby on rails

I am building an application which should extract all the open issues from any of the directory of github using github-api gem in ROR. The problem is that it is also extracting pull requests from the repository. Is there any way to extract only open issues. here is the blog from where I am following. […]

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