Postingan

Menampilkan postingan dari Maret, 2012

Ubuntu Compaq Presario install Webcam

Go to : 1. Applications 2. Ubuntu Sofware Center 3. Search => Cheese Webcam Booth 4. Click Install 5. After that check in Application> Sound and Video> Cheese Webcam Booth 6. Finish

rails 3 Recaptcha::RecaptchaError (uninitialized constant Recaptcha::Verify::Net)

put line: require 'net/http' in config/initializer/recapcha.rb

ruby on rails devise skip validation of password, when edit user in user form

If you want to skip password validation in devise login. In users controller, you only add line below: sign_in @user, :bypass => true unless params[:user][:password].blank? for example: def update     if @user.update_user_data(params[:user])       sign_in @user, :bypass => true unless params[:user][:password].blank?       if current_user.is_admin?         redirect_to users_path       else         redirect_to edit_user_path(current_user)       end     else       render :action => :edit     end   end

Javascript simple prompt

var name; // Prompt for the user's name here. prompt("what's your name?"); if(name === "Sam") {   console.log("Your name is Sam!"); } else{   console.log("Your name isn't Sam!"); }

ubuntu ruby on rails /gems/activesupport-2.3.2/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

1. go to config/boot.rb 2. add require 'thread' below:     RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)     require 'thread'

Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

gem install -v=2.3.8 rails

ruby on rails 3.2.1 in ubuntu 10.10 `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

1. Go to terminal 2. sudo apt-get install nodejs 3. rails s again

rails 3 Installing pg (0.11.0) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!

Installing pg (0.11.0) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks! /home/lap048/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /home/lap048/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb --with-pg-config=/usr/local/Cellar/postgresql/9.1.2/bin/pg_config Using config values from /usr/local/Cellar/postgresql/9.1.2/bin/pg_config *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-li...

Ubuntu 10.10 how to install netbeans for rub on rails

Install netbeans for ruby on rails di ubuntu 10.10 1. http://netbeans.org/downloads/6.9.1/ 2. Download netbeans for ruby 3. In terminal you should to go to the directory after you finished to download. for example: cd home/your_computer/Downloads 4. sudo apt-get install openjdk-6-jdk 5. sudo sh  ./netbeans-6.9.1-ml-javase-linux.sh 6. finish.

rvm ERROR: Loading command: install (LoadError) no such file to load -- zlib

you can do this: 1. $ rvm pkg install zlib 2. $ rvm reinstall 1.9.2 --with-zlib-dir=$rvm_path/usr if you want to learn more you can go to this link

ruby on rails 3 authlogic session[:return_to] = request.request_uri

reverse below     def store_location       session[:return_to] = request.request_uri     end   by    def store_location       session[:return_to] = request.fullpath     end

ubuntu gedit for rails

http://runningwithrails.com/2011/02/configuring-gedit-for-rails/

ruby on rails phymyadmin make new user

How to make user in phpmyadmin: 1. you must log in as root 2. choose Previllage menu 3. click Add new a User link 4. fill the field username with your username 5. select Local to become localhost 6. fill your password 7. click radio button grand all privilages 8. click Go.