How to restart a rails server on Heroku?

The answer was: heroku restart -a app_name # The -a is the same as –app Easily aliased with alias hra=”heroku restart –app ” Which you can make a permanent alias by adding it to your .bashrc or .bash_aliases file as described at: https://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias and Creating permanent executable aliases Then you can just type hra app_name … Read more

curl : (1) Protocol https not supported or disabled in libcurl

Got the answer HERE for windows, it says there that: curl -XPUT ‘http://localhost:9200/api/twittervnext/tweet’ Woops, first try and already an error: curl: (1) Protocol ‘http not supported or disabled in libcurl The reason for this error is kind of stupid, Windows doesn’t like it when you are using single quotes for commands. So the correct command … Read more

Difference between Destroy and Delete

Basically destroy runs any callbacks on the model while delete doesn’t. From the Rails API: ActiveRecord::Persistence.delete Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted). Returns the frozen instance. The row is simply removed with an SQL DELETE statement on the … Read more

Ruby Bundle Symbol not found: _SSLv2_client_method (LoadError)

I just fixed a similar issue on my system. You need to rebuild your install of Ruby 2.1.2 and it will re-link against the newly-updated SSL. $ rbenv install 2.1.2 rbenv: /Users/ryan/.rbenv/versions/2.1.2 already exists continue with installation? (y/N) y Downloading ruby-2.1.2.tar.gz… -> http://dqw8nmjcqpjn7.cloudfront.net/f22a6447811a81f3c808d1c2a5ce3b5f5f0955c68c9a749182feb425589e6635 Installing ruby-2.1.2… Installed ruby-2.1.2 to /Users/ryan/.rbenv/versions/2.1.2