Run Ruby on Rails dev server on windows and linux
Run your main http server during development : $> rails server Run solr : $> rake sunspot:solr:run
Just another Yipp.ca Blogs site
Run your main http server during development : $> rails server Run solr : $> rake sunspot:solr:run
Wrong: UserMailer.deliver_welcome_email(@user, srequest.unique_id, websitename, request.host) Good: UserMailer.welcome_email(@user, srequest.unique_id, websitename, request.host).deliver
Wrong: existingRequest = Signuprequest.first(:conditions => { :unique_id => intHex.to_s }); Good: existingRequest = Signuprequest.where(:unique_id => intHex.to_s).first;
ActiveModel::ForbiddenAttributesError when creating new user Solution: On your POST handler, you need to untaint your params with: class UsersController < ApplicationController (...) def create #post @user = User.new(user_params) (...) end (...) private def user_params...
,\s:controller\s=>\s['"](.*)['"]\s,\s:action\s=>\s['"](.*)['"] => "$1#$2" map.connect(.*),\s:conditions\s=>\s{\s:method\s=>\s:get\s} => get$1 The official way is with this plugin https://github.com/rails/rails_upgrade But it is outdated, and upon extracting the routing upgrade script, the output is not usable and still requires manual...
undefined method `request_uri' for # Replace : def store_location session[:return_to] = request.request_uri end by : def store_location session[:return_to] = request.url end et voilà !
class ApplicationController < ActionController::Base helper :all helper_method :current_user_session, :current_user filter_parameter_logging :password, :password_confirmation Solution: It is now builtin authlogic, you do not need to include this line at all !
In Ruby on Rails you just need to add it to project-root/Gemfile gem 'xyz' # or gem 'xyz', '~> 1.0.0'
I need help for this !!!! I didn't find the solution. c:\Ruby22-x64\DevKit>gem install mysql Fetching: mysql-2.9.1.gem (100%) Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing...
Let's fix this : $> gem install activesupport Fetching: i18n-0.7.0.gem (100%) Fetching: json-1.8.3.gem (100%) ERROR: Error installing activesupport: The 'json' native gem requires installed build tools. Please update your PATH to include build tools...
Recent Comments