I have just tried to deploy my Rails 3 application which uses ActiveAdmin and I’ve gotten the following error:
File to import not found or unreadable: active_admin/mixins
I have just tried to deploy my Rails 3 application which uses ActiveAdmin and I’ve gotten the following error:
File to import not found or unreadable: active_admin/mixins
I got the following error when trying to start the ‘rails console’ in a Rails3/Ruby 1.9.2 project:
`require’: no such file to load — readline (LoadError)
The problem was that readline was not installed properly. To install it, I needed to go into the ruby sources. In my case they were located in the directory /use/local/src/ruby-1.9.2-p0/ext/readline. I changed to it an built and installed realdline via
ruby extconf.rb make sudo make install
In Rails 3 the modules in lib/ are not loaded automatically. You need to a a one liner to the application.rb:
config.autoload_paths += %W(#{config.root}/lib)
Just found this little plugin which is maybe interesting to protect against Cross-site scripting in Ruby on Rails.
xss_terminate is a plugin in that makes stripping and sanitizing HTML stupid-simple. Install and forget. And forget about forgetting to h your output, because you won‘t need to anymore.
To run Rake tasks with Ruby on Rails in different environments, you just provide the necessary variable when starting the task:
$ RAILS_ENV=staging rake db:migrate
In this case we are starting the migration tasks in an environment called staging. You can of course also provide the standard environments like development, test or production.