Emacs Ruby autocomplete almost working

Here’s a thought: The macro binds a flet function (rails-project:root) one time to the value that (rails-project:root) has just before the body executes. (That’s how it claims a performance increase: Apparently the outer (rails-project:root) is expensive, so calling once and caching the value seems like a good idea.) Unfortunately, if there is code inside the … Read more

Get Error: You must install at least one postgresql-client- package when deploy to heroku

On a Debian based system the PostreSQL client programs are provided by postgresql-client-common as symbolic links to /usr/share/postgresql-common/pg_wrapper. If you install that package and attempt to use any of the PostgreSQL client programs like psql, pg_dump, pg_dumpall, and pg_restore, the pg_wrapper without having the version specific binary package installed, like postgresql-client-9.1 it will emit this … Read more

How do I remove the Devise route to sign up?

you can do this in your model # typical devise setup in User.rb devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable change it to: devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable notice that the symbol :registerable was removed That’s it, nothing else is required. All routes and links to registration page are magically removed too.

Adding :default => true to boolean in existing Rails column

change_column is a method of ActiveRecord::Migration, so you can’t call it like that in the console. If you want to add a default value for this column, create a new migration: rails g migration add_default_value_to_show_attribute Then in the migration created: # That’s the more generic way to change a column def up change_column :profiles, :show_attribute, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)