How I did this
I could not install Ruby
2.3.4 which I needed because Heroku does not support latest stable release like
2.4.0. So my Gemfile has locked the version
2.3.4. Till now I have been manually commenting out that particular line from the Gemfile and skipping the change from Git-Commits.
I found a hack
- install ruby
sudo apt-get install ruby2.3 ruby2.3-dev
- find location of the ruby installed
which ruby2.3 # => /usr/bin/ruby2.3
- Mount the ruby to RVM
rvm mount /usr/bin/ruby2.3 -n ruby-2.3.3 rvm list rvm rubies * ext-ruby-2.3.3 [ x86_64 ] ruby-1.8.7-p371 [ x86_64 ] ruby-1.9.3-p551 [ x86_64 ] => ruby-2.4.0 [ x86_64 ]
A better option
Install Ruby from archived link
rvm mount -r https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.3.tar.bz2
I have setup devise for one
active-admin (AdminUser) and other for
normal-user (User model).
This was config before
ActiveAdmin.routes(self) devise_for :admin_users, ActiveAdmin::Devise.config
then I changed it to
devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self)
Note: the order is important
# this works devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self) # this won't work ActiveAdmin.routes(self) devise_for :admin_users, ActiveAdmin::Devise.config
active-admin login won’t show up when you hit
admin/login but normal login will show up(if you have setup devise for two models).
If you are considering using templates which you copied to
vendor directory then things you need to keep in mind:-
- Move all assets like Images, sounds, Fonts but not
- Add this line in
Rails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf)\z/
- Make sure you are using `rails_12factor` gem in production
@importsrule you do not use
.cssat last of the filename. It automatically calculates.
If you are a UNIX lover and fan of Nano text editor then while writing C / C++ code, you would like to put comments using Short-Cut key i.e.
Alt+3. But the problem is, Nano puts the char
# as comment literal instead of
//. This happened because the default literal is
# unless it is defined in configurations.
How to fix?
These days developers go for heavy text-editors and IDEs like InteliJ, PyCharm, RubyMine, Sublime Text with much more extensions, Vim, Emacs, etc. However, in case of the later two they are not memory and processor heavy however they have very steep learning curves.
On the other hand, GNU Nano come as a life saver. It requires a few MB of RAM(say 3-4 MB) and uses very less CPU resource. Nano is a much powerful tool with much more features.
Computer’s primary memory is divided into four segments, namely: data, stack, heap and code.
What is Memory Management?
You are already familiar with the notion that Memory is most expensive resource in the system. Therefore you only use and ask for amount of memory that will suffice. As soon as you are done, you free up the memory so that OS can sell those memory blocks to some other needy software. This practice of using memory wisely is known as Memory Management. Continue reading