Category: ruby

Unit tests in Ruby on Rails 0

Unit tests in Ruby on Rails

How to write and run your first unit test for your ruby on rails webapp Fist time setup $ rake db:test:load This will recreate a new test DB based ont the current schema! Tasks...

param is missing or the value is empty nested require permit 0

param is missing or the value is empty nested require permit

Error: param is missing or the value is empty: home_address_attributes Before (wrong) private def user_params Rails.logger.info("PARAMS: #{params.inspect}") params.require(:user).permit(:fullname, :login, :password, :password_confirmation, :phone_home, :phone_work, :phone_cell, :deliveryNote, :home_address_attributes).require(:home_address_attributes) end After (good) private def user_params Rails.logger.info("PARAMS: #{params.inspect}")...

Solr failure 0

Solr failure

1735 INFO (main) [ ] o.a.s.c.SolrXmlConfig Loading container configuration from /home/cbuy/public_html/solr/solr.xml 1830 ERROR (main) [ ] o.a.s.s.SolrDispatchFilter Could not start Solr. Check solr/home property and the logs 1861 ERROR (main) [ ] o.a.s.c.SolrCore null:org.apache.solr.common.SolrException:...

Install Ruby 2.1 with Virtualmin on Debian 7 0

Install Ruby 2.1 with Virtualmin on Debian 7

Install Ruby 2.1 # as root apt-get update apt-get install build-essential bison openssl libreadline6 libreadline6-dev \ libyaml-dev libxml2-dev libxslt-dev zlib1g zlib1g-dev libssl-dev autoconf \ libc6-dev ncurses-dev libaprutil1-dev libffi-dev libcurl4-openssl-dev libapr1-dev cd ~ wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.9.tar.gz...

Upgrade Ruby 1.8 to 2.1 with ActiveRecord 4 0

Upgrade Ruby 1.8 to 2.1 with ActiveRecord 4

Old Forms were like this, but now they don't render! <% form_for @seller, :url => "/seller/create" do |f| %> New <%= form_for @seller, :url => "/seller/create" do |f| %> Old Partial render are also...