Tag: ruby on rails

Precompiling assets failed, pre-receive hook declined

rake aborted! remote: NoMethodError: undefined method `configure’ for #<LearnRails::Application:0x007f440b80c9c8> remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/config/environments/production.rb:1:in `<top (required)>’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block in require’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:590:in `each’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:590:in `block in <class:Engine>’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `instance_exec’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `run’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:55:in `block in run_initializers’ remote: /tmp/build_c58e817396acd7fe215a3b1c6bf3b6a5/vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:44:in […]

How to overwrite local files with a specific Heroku release version?

I made a series of small commits to an Heroku app without realizing something broke. I was able to rollback to previous versions and found the last working version. I’m not sure what the proper git wordage is here (I guess either clone or pull). To clarify I want to replace all of my local […]

git push heroku master – Fetching repository, done. Everything up-to-date

Note: I am using iOS Mavericks. I have been using RailsApp Project Tutorials. It says that everything is working ok: MacBook-Air:XXX zachmachuca$ git push heroku master Fetching repository, done. Everything up-to-date But when I enter $ heroku open the page shows me: The page you were looking for doesn’t exist. You may have mistyped the […]

How do I use the command “heroku pg:transfer”?

I am very new to heroku/ruby on rails and git. I just went through Michael Hartl’s Ruby on Rails tutorial and want to push my local database to heroku but am having trouble. After doing some research I found this article: pg transfer is the new taps It seems like it should work, but I […]

Ruby – Finding the data in specific field/key of hash

I collected a list of all tags of my github repo using github api. Suppose I store it in a variable named ‘released_tags’. Eg: Data in ‘released_tags’ would be something similar to data displayed in https://api.github.com/repos/fastly/epoch/tags I have a number 0.3 and I wish to find it in the value of the name field of […]

bundler does not vendor/bundle :git source gem

I’m using Bundler version 1.3.5 and Ruby 2.0.0-rc2. When I use the command bundle install –deployment on my production server all my gems are copied to vendor/bundle, except for the one that has a :git source in the Gemfile. I don’t get any errors and the gem is listed and even downloaded when running the […]

How can I run a script on my server using gcloud compute?

I’m deploying my Rails apps on Compute Engine, and my code is hosted at Github. I want to push changes to my master branch, and then execute a gcloud compute command to tell my instances to pull the master repository and restart nginx. If I can’t execute a script from SSH, what’s the best way […]

What is the best way to test RailsApps App in Gitlab CI?

I’ve created Ruby on Rails app using Rails Composer and I want to use it with Gitlab CI (v5.0.1 on OS X 10.9.4) with Gitlab CI Runner also on OS X 10.9.4. What I should use as build steps? I started with: . ~/.bash_profile rvm use ruby-2.1.2@myapp bundle install rspec spec I used .bash_profile because […]

Can't clone own github repository, get obscure fatal error

So I made changes to my rails app on my local machine that were never committed and that I decided to discard. Decided to rollback to most recent commit by deleting my rails app and all its files, and then cloning my most recent commit from my github repository. Unfortunately git clone https://github.com/my_username/rails_app.git results in […]

How can I opensource my code on git and maintain deploy scripts with proper config files?

I have an app being developed on github. I want to opensource it. Currently we use a capistrano script to deploy to our staging & production servers. I am trying to figure out how we can put our config files in a separate repo, and still use capistrano to execute one touch deploys. The goal […]

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