[Rails] Unable to change Font

2011-07-28 Thread Yennie
Hi, I have a problem to set up the language I did use @font-face { font-family: english; src: url("<%= current_language.get_font_url %>") format('truetype'); } html { font-family: english; } %= current_language.get_font_url => app_data/language_english/ fon

[Rails] Error of Testing index (undefined)

2011-07-19 Thread Yennie
Hi, I follow the tutorial of testing the params then i got the error when i test.. can someone help me Thanks for your help Yennie code def disable if !(@user = User.find_by_id(params[:id])) render :action => "common/error_notfound" else @user.save

[Rails] Re: error of testing redirect in controller

2011-07-19 Thread Yennie
Thank you Chirag, it s good now > > Chiraghttp://sumeruonrails.com > > > > > > > > On Mon, Jul 18, 2011 at 7:38 PM, Yennie wrote: > > > On Jul 18, 9:57 am, Chirag Singhal wrote: > > > You have to send params along with call to post. > > > Sin

[Rails] error of render

2011-07-18 Thread Yennie
Hi I test "simple"> response.should render_template("home_simple") How can i test the < render "home" > response.should render_template("home") it gives me error as : expecting <"home"> but rendering with <"">. def home if !current_user render

[Rails] error of redirect page (Controller Test)

2011-07-18 Thread Yennie
Hi, I have a trouble of testing controller with redirect to the confirm page I dont understand why i can pass the render the template new but not to redirect the confirm please help in browser the link is http://0.0.0.0:3000/register_confirm def create @user = User.new(params[:user])

[Rails] Re: error of testing redirect in controller

2011-07-18 Thread Yennie
u expected a redirect but got render. Can you give me an example that how to send the param to the post. I am pretty new with testing controller in rails > > Chiraghttp://sumeruonrails.com > > > > > > > > On Mon, Jul 18, 2011 at 7:14 PM, Yennie wrote: > > Hi, > &

[Rails] error of testing redirect in controller

2011-07-18 Thread Yennie
Hi, I want to test the user controller, how can i do the code is if @user.save redirect_to :action => "confirm" else . test user = User.new(:email => "b...@mail.com", :password => "12345", :name => "you") post :create user.should_re

[Rails] Re: testing foreign key of rails fail

2011-07-12 Thread Yennie
On Jul 12, 4:04 pm, Colin Law wrote: > On 12 July 2011 19:22, Yennie wrote: > > > > > > > > > > > I have a some warnings about the referencing offoreignkey, > > i did try several way to solve this problem but i am still stuck with > >foreignkey

[Rails] testing foreign key of rails fail

2011-07-12 Thread Yennie
I have a some warnings about the referencing of foreign key, i did try several way to solve this problem but i am still stuck with foreign key. is the syntax of setting foreign key is wrong? can anyone help to fix the problem ~user table id name address guest ~ prescription table id person (in

[Rails] Re: has_many and belongs_to association

2011-07-12 Thread Yennie
On Jul 11, 2:59 pm, Frederick Cheung wrote: > On 11 Jul 2011, at 17:59, Yennie wrote: > > > > > > > > > > > > > On Jul 11, 12:13 pm, Colin Law wrote: > >> On 11 July 2011 17:05, Yennie wrote: > > >>> Hi , > > >>

[Rails] Re: has_many and belongs_to association

2011-07-11 Thread Yennie
On Jul 11, 12:13 pm, Colin Law wrote: > On 11 July 2011 17:05, Yennie wrote: > > > > > > > > > > > Hi , > > > I want to test the one below but I got the problem > > >  belongs_to :name, :class_name => "Phrase", :foreign_key =&g

[Rails] has_many and belongs_to association

2011-07-11 Thread Yennie
nguage does not have a phrase_id foreign key.). Expected block to return true value. I dont really understand what it's warning now.. Yennie -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send ema

[Rails] error of testing has_many :through

2011-07-08 Thread Yennie
Hi everyone, I am testing the validation of association of the model but i can a error.. plzz help error /usr/local/lib/ruby/gems/1.9.1/gems/shoulda-2.11.3/lib/shoulda/ active_record/matchers/association_matcher.rb:27:in `have_many': wrong number of arguments (2 for 1) (ArgumentError) fr

[Rails] error of should validate_presence_of (shoulda)

2011-07-07 Thread Yennie
te_presence_of :prescription_id should validate_presence_of :phrase_id should belong_to :prescription should belong_to :phrase end plz help me .. thanks Yennie -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] Re: error of DEPRECATION WARNING

2011-07-06 Thread Yennie
is, it will be sent to byte heaven with a few swift > swipes of the delete key on next versions of whatever tool it is you are > using, which seems to be shoulda in your case. I take it your tests aren't > failing because of that? > > Paulo Muggler > > > > > > &g

[Rails] error of DEPRECATION WARNING

2011-07-06 Thread Yennie
Hi all can anyone give me a tip what is "DEPRECATION WARNING: use: should have_many. (called from block in at test/unit/phrase_test.rb:6)" when i command "rake test" I have installed shoulda (2.11.3) plzz help -- You received this message because you are subscribed to the Google Groups "Ru

[Rails] Re: require 'spec_helper'

2011-07-06 Thread Yennie
On Jul 6, 8:47 pm, Yennie wrote: > I have an error > Desktop/Pictographs/config/boot.rb:1:in `require': no such file to > load -- rubygems (LoadError) ./spec/functionals/user_controller_spec.rb:1:in `require': no such file to load -- ./spec/functionalsspec_helper (Load

[Rails] require 'spec_helper'

2011-07-06 Thread Yennie
I have an error Desktop/Pictographs/config/boot.rb:1:in `require': no such file to load -- rubygems (LoadError) but i did "rails g rspec:install" and i have a spec_helper.rb in the spec directory.. why does it complain that missing file? please help Yennie ~Test File~

[Rails] Re: undefined method `post' and 'assigns'

2011-07-06 Thread Yennie
On Jul 6, 3:34 pm, Frederick Cheung wrote: > On Jul 6, 8:19 pm, Yennie wrote: > > > Hi, > > > I have an error of undefined method. > > can anyone help me to solve it. > > I follow the tutorial to practicing testing controller of rails, and > > no

[Rails] Re: undefined method `post' and 'assigns'

2011-07-06 Thread Yennie
On Jul 6, 3:34 pm, Frederick Cheung wrote: > On Jul 6, 8:19 pm, Yennie wrote: > > > Hi, > > > I have an error of undefined method. > > can anyone help me to solve it. > > I follow the tutorial to practicing testing controller of rails, and > > no

[Rails] Re: undefined method `post' and 'assigns'

2011-07-06 Thread Yennie
On Jul 6, 3:19 pm, Yennie wrote: > Hi, > > I have an error of undefined method. > can anyone help me to solve it. > I follow the tutorial to practicing testing controller of rails, and > now i got stuck with the error.. plz help > > error: > undefined method `post&

[Rails] undefined method `post' and 'assign'

2011-07-06 Thread Yennie
Index" do def mock_product(stubs={}) post 'index' @mock_user ||= mock_model(User, stubs).as_null_object end def setup @user = User.new end controller file def index @users = User.find(:all) end please give me some help .. thanks Yennie -- You received this mess

[Rails] undefined method `post' and 'assigns'

2011-07-06 Thread Yennie
) end end please give me some help .. thanks Yennie -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyo

[Rails] undefined method `assigns' and undefined method `post'

2011-07-06 Thread Yennie
Index" do def mock_product(stubs={}) @mock_user ||= mock_model(User, stubs).as_null_object end def setup @user = User.new end please give me some help .. thanks Yennie it "assigns all users as @users" do @user.stub(:all){[mock_user]} assigns(:users).shou

[Rails] Problem of rake spec

2011-07-05 Thread Yennie
Hi, I use rake spec to run file user_controller_spec but it seems nothing happed can anyone help me to solve the problem yennie@ubuntu:~/Desktop/Picto$ rake spec (in /home/joanne/Desktop/Picto) Test file Picto/spec/user_controller_spec.rb require "spec_helper" describ

[Rails] Error of rake (rake spec)

2011-07-05 Thread Yennie
Hi, I have a problem when i type rake or rake spec to test my file it asks me to install the extension and check the version of bson and mongo Using mongo (1.3.1) Using bson (1.3.1) but i have no idea where my load path is. so that i cannot make sure is bson_ext is in my load path or not please

[Rails] Re: Problem of "rake spec"

2011-07-05 Thread Yennie
ler_spec.rb failed (See full trace by running task with --trace) > in your Gemfile. Should be part of the test group. > > > > > > > > On Tue, Jul 5, 2011 at 9:20 AM, Yennie wrote: > > Hi Martin, > > > When i rename the user_controller_test.rb => user_c

[Rails] Re: Problem of "rake spec"

2011-07-05 Thread Yennie
ted! ruby -S bundle exec rspec ./spec/functional/ languages_controller_spec.rb failed (See full trace by running task with --trace) plz help.. Yennie On Jul 5, 12:07 pm, Martin Wawrusch wrote: > your file needs to be named user_controller_spec.rb > the _spec.rb is important > &g

[Rails] Problem of "rake spec"

2011-07-05 Thread Yennie
Hi all, I am a bit confused when i type rake spec and it gives me this message, No examples matching ./spec/**/*_spec.rb could be found what is that mean that something is not found. and where i can input my the test code because i did have a tiny sample code in user_controller_test.rb. is that

[Rails] error of "rake test" command

2011-07-04 Thread Yennie
dError) Thank you very much Yennie -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr

[Rails] Re: error of uninstall gem

2011-07-04 Thread Yennie
thanks, i can uninstall it.. On Jul 4, 11:01 pm, Leoncio Caminha wrote: > are you try "sudo gem uninstall rake" ? > Em 04/07/2011, às 23:59, Hassan Schroeder escreveu: > > > > > > > > > On Mon, Jul 4, 2011 at 7:54 PM, Yennie wrote: > >>

[Rails] error of uninstall gem

2011-07-04 Thread Yennie
gem uninstall rake Select gem to uninstall: 1. rake-0.8.7 2. rake-0.9.2 3. All versions > 3 ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /usr/local/lib/ruby/gems/ 1.9.1 directory. -- You received this message because you are subscri

[Rails] (urgent) Testing Controller of Rails

2011-07-04 Thread Yennie
Hi, I am a new comer of testing on rails . I am trying to testing my controller, and read a lot of testing using rspec and shoulda. can anyone give me some examples about those rspec. cuz sometime i did not understand how to use rspec for the controller. def create @user = User.new(param

[Rails] How to play with shoulda with functional testing

2011-06-30 Thread Yennie
Hi, I am new in rails testing, and now i try to use shoulda to test the functional section. can anyone give me some advice, example or recommend tutorial site to me.. thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to thi

[Rails] Re: (urgent) How to install shoulda

2011-06-29 Thread Yennie
Thanks Chirag, it works fine now.. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/KAdpXk8YmTgJ. To post to this group, send email to rubyonra

[Rails] Re: (urgent) How to install shoulda

2011-06-29 Thread Yennie
Yes, I am using Rails 3. I did successfully install the shoulda. thank you so much. but i got some error "17) Error: test_should_get_update(UsersControllerTest): ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: cultures: DELETE FROM "cultures" WHERE 1=1 " but I did delete t

[Rails] Re: Error of DEPRECATION WARNING

2011-06-29 Thread Yennie
can u help me about this question http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/f277b0fadde17bda?hl=en -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google

[Rails] (urgent) How to install shoulda

2011-06-29 Thread Yennie
Hi, I have trouble about install Shoulda, can someone give me some instruction to install it I try some .. it ask me to add those code Rails::Initializer.run do |config| config.gem "shoulda", :lib => "shoulda" end then i cannot do rake to test units. it gives me error of /usr/local/lib/r

[Rails] Error of DEPRECATION WARNING

2011-06-29 Thread Yennie
Hi, I Have a strange error when i type the command "rake db:migrate " Can you help to solve this error or give me some advices the error is: DEPRECATION WARNING: Rake tasks in /home/joanne/Desktop/picto/vendor/ plugins/prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks instead. (call

[Rails] error from command rake test:units

2011-06-28 Thread Yennie
I got some error when i run the command line rake test:units 14) Error: test_the_truth(UserTest): ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: cultures: DELETE FROM "cultures" WHERE 1=1 I did delete the model culture from my project.. and i change it it as other name. co

[Rails] Error of undefined method

2011-06-20 Thread Yennie
Hi all, I have very basic error that i have no idea how to show I have user table id name add phone number then i select all in user table using => @users = User.all => @users.name it gives me undefined method name Array<.> Please give me some advice.. Thanks -- You received this mess

[Rails] undefined method culture_id

2011-06-14 Thread Yennie
Hi all, I have an error which said undefined method culture_id but in the DB, it contains "culture_id" in user table.. Picture.where(:album_id => :album, :culture_id => User.culture_id).first Please help to solve this problem... THanks -- You received this message because you are subscribed

[Rails] error of looping in rails

2011-06-13 Thread Yennie
Hi, I am writing this code in purpose that i can i select image from the picture table and i want to get all the user so i can loop through user1 , user2 and display the pic on bowers.. def show_image @id = User.find(:all, :select => 'user.id') for id in @id @image = Act

[Rails] how to get the list of users' id

2011-06-13 Thread Yennie
Hi, I have a question that how to take a list of user on user table def show_pic @id = User.find(:all, :select => 'users.id') @id.each do |i| @pic = ActiveRecord::Base.connection.select_value( select picture from albums a