[Rails] Server is not starting

2012-06-19 Thread Amir Z.
I am running the command rails server on ubuntu 12.04 having rails 3 but getting following error. amir@ubuntu:~/app$ rails server /home/amir/.rvm/gems/ruby-1.9.2-p320/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephens

[Rails] Re: Unfortunately, a fatal error has occurred.

2012-06-19 Thread Amir Z.
Leoncio Caminha wrote in post #1065093: > libssl-dev is required on your system. > try this: > sudo apt-get install libssl-dev > cd ~/.rvm/src/yourRubyVersion/ext/openssl > ruby extconf.rb > make && make install Dear Leoncio Caminha Many thanks to you. I installed the bundle but now the problem

[Rails] Re: Unfortunately, a fatal error has occurred.

2012-06-19 Thread Amir Z.
My Gemfile is below as well for your ready reference. source 'https://rubygems.org' gem 'rails', '3.2.6' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'sqlite3' # Gems used only for assets and not required # in production environments by default. g

[Rails] Re: Unfortunately, a fatal error has occurred.

2012-06-19 Thread Amir Z.
>> Open your terminal and >> >> cd /FolderApp >> >> and the commands will work fine! My result is below when i am running bundle install in app folder amir@ubuntu:~/project$ bundle install Fetching gem metadata from https://rubygems.org/.Unfortunately, a fatal error has occurred. Please see the

[Rails] Re: Unfortunately, a fatal error has occurred.

2012-06-19 Thread Amir Z.
leoncio caminha wrote in post #1064998: > the bundle commands only works inside directory. > > Open your terminal and > > cd /FolderApp > > and the commands will work fine! Thanks Leoncio Caminha I also tried same commands in the folder app but couldn't succeed. Please help me out. Amir -- Po

[Rails] Unfortunately, a fatal error has occurred.

2012-06-18 Thread Amir Z.
I am newbie on Linux Ubuntu. Before i was working on windows and many people suggest me to work with Linux is better then windows. I installed ubuntu 12.04 in my system but facing myriad problems because of new to it. I installed ruby 1.9.2 and rails 3 with RVM but when I am making a new project b

[Rails] Re: Ferret problem

2012-05-24 Thread Amir Z.
azizmb.in wrote in post #1061961: > Hey Amir > > Have you tried the solutions on this thread: > > http://www.ruby-forum.com/topic/139611 > > > -- > - Aziz M. Bookwala > Dear Br. Aziz Thanks for your suggestion. Br I also go through this link but couldn't succeed. There is one query regarding t

[Rails] Ferret problem

2012-05-24 Thread Amir Z.
I stuck in search element problem. I am trying to install ferret on my window 7. But tried a lot but couldn't succeed. I ran following command to install the ferret gem. gem install ferret gem install ferret --version (all versions) gem install ferret -v 0.11.5 gem install ferret -v 0.11.6 gem in

[Rails] Re: undefined method `paginate'

2012-05-22 Thread Amir Z.
> You dont have a "def paginate " method defined in your controller. > Anyway you'll probably want to use a pagination gem such as Kaminari, > which > includes all you need for that purpose. Hi Juan, Thanks for the help message. Juan I am newbie on ROR could you please help me how to install kam

[Rails] Re: Re: ERROR: could not find gem ferret locally or in a repository

2012-05-22 Thread Amir Z.
> maybe a > proxy is not set. > Hi Guilherme Guipereira Thanks for the help. I am newbie on ROR. So, I do not know how to set the proxy for it. Could you please help me to set it? Thanks Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

[Rails] undefined method `paginate'

2012-05-22 Thread Amir Z.
I am working with Railsspace social networking book. I stuck in the problem when i am doing paginate for the search result. It gives the following error. NoMethodError in CommunityController#index undefined method `paginate' for # My Controller Index page coding is below def index @title = "Com

[Rails] Re: ERROR: could not find gem ferret locally or in a repository

2012-05-22 Thread Amir Z.
Please help me out! -- Posted via http://www.ruby-forum.com/. -- 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 rub

[Rails] ERROR: could not find gem ferret locally or in a repository

2012-05-21 Thread Amir Z.
When i am installing ferret. It is giving following error. ERROR: could not find gem ferret locally or in a repository. Any help is appreciable. Thanks Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails

[Rails] Error in insoshi app

2012-05-16 Thread Amir Z.
Hi All, I stuck in the problem when I run insoshi application. I connect the app with the database and try to migrate with db with the command rake db:migrate. It gives the following error. rake aborted! no such file to load -- chronic Any help is appreciable. Thanks Amir -- Posted via http:

[Rails] Re: Errno::ENOENT: No such file or directory

2012-05-06 Thread Amir Z.
I stuck in the problem when, I am running performance test. Below is the error code. Errno::ENOENT: No such file or directory Please help me out. Thanks Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rail

[Rails] Re: Getting Years, Months and days from a day of born

2012-05-01 Thread Amir Z.
Hi Gonzalez, We can create script using present date and date of born. Years = present year - birth year Days= present date - birth date Months = present month - birth month Is it you looking for? Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Re: Re: Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-05-01 Thread Amir Z.
> yml is very strict about formatting. You need spaces at the front of > nested lines, so > valid_user: > id: 1 > screen_name: foobar > email: foo...@gmail.com > password: foobar > remember_me: > authorization_token: 1 > > Note the spaces in front of id:, screen_name: and so on. Coli

[Rails] Errno::ENOENT: No such file or directory

2012-04-30 Thread Amir Z.
I am working with Agile Web Development Book. I create complete app but when I am trying to test my first unit testing. Its showing following error. 1) Error: test_truth(ProductTest): Errno::ENOENT: No such file or directory - rails.png C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems

[Rails] Re: Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-30 Thread Amir Z.
> Have you got the spaces at the front of the nested lines? > > Copy and paste the file here. > > Colin Dear Colin below is yml file. # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html valid_user: id: 1 screen_name: foobar email: foo...@gmail.com password: foobar authorizat

[Rails] Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-27 Thread Amir Z.
> yml is very strict about formatting. You need spaces at the front of > nested lines, so > valid_user: > id: 1 > screen_name: foobar > email: foo...@gmail.com > password: foobar > remember_me: > authorization_token: 1 > > Note the spaces at the front of each line. Make sure there are

[Rails] Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-26 Thread Amir Z.
> What about the spaces at the front of the lines? Though looking at > the error I do not think this is the problem. what kind of spaces you are talking about? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rail

[Rails] Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-26 Thread Amir Z.
I removed the remember_me from fixture file but still have the same problem. -- Posted via http://www.ruby-forum.com/. -- 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.c

[Rails] Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-26 Thread Amir Z.
what is in fixture.rb def initialize(fixture, class_name) case fixture when Hash, YAML::Omap @fixture = fixture when String @fixture = read_fixture_file(fixture) else raise ArgumentError, "Bad fixture argument #{fixture.inspect} "Line no 770" during

[Rails] Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-26 Thread Amir Z.
testing result b/active_record/fixtures.rb:676:in `read_fixture_files' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record/fixtures.rb:549:in `initialize' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/li b/active_record

[Rails] ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-26 Thread Amir Z.
When i am testing its gives following error. 1) Error: test_truth(RememberMeTest): ArgumentError: Bad fixture argument 2 during creation of User fixture . . . . . .1 tests, 0 assertions, 0 failures, 1 errors rake aborted! Command failed with status (1): [Routes.../IR/ruby/bin/ruby -...] (See f

[Rails] Re: showing error (gsub) when switching from session to cookies

2012-04-25 Thread Amir Z.
Thank you Fred. Excellent work. Your ideas my effort makes the code workable :) Hope I will get the help in further problems as I am new to rails.:) Thanks Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on

[Rails] Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-25 Thread Amir Z.
Hey Colin ! I am happy to see you here and I am sure you are going to help me out this time also :). I am trying to check where is the mistake. Lets come back to you after getting error :). -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to th

[Rails] Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-25 Thread Amir Z.
Hey Colin ! I am happy to see you here and I am sure you are going to help me out this time also :) I am trying to check where is the mistake. Let come back to you after getting error :) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Re: showing error (gsub) when switching from session to cookies

2012-04-25 Thread Amir Z.
I got the point. Thank you so much Colin. Now code is working fine. Problem was that I was not using the hashing algorithm for authorization_token. It was taking the user.id as an authorization_token. As I apply the hashing algorithm to it. Hashing generates authorization token as a string.

[Rails] Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-25 Thread Amir Z.
Some time before my test was working fine. Now getting errors in all test 12test assertion 0 : failure 0; error 12 Please help me out. I want to git rid of this problem. Thanks in advance Amir -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Re: Please help --> Getting error ERROR NoMethodError: private method `gsub!' called for #

2012-04-25 Thread Amir Z.
Error showing in line no. 27 Please find below the error trace C:/Users/Amir/Downloads/IR/ruby/lib/ruby/1.8/cgi.rb:342:in `escape' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_ext/cookie.rb:73:in `to_s' C:/Users/Amir/Downloads/IR/ruby/lib/rub

[Rails] Re: showing error (gsub) when switching from session to cookies

2012-04-25 Thread Amir Z.
Please find my login code below. def login if request.get? @user = User.new(:remember_me => cookies[:remember_me] || "0") elsif param_posted?(:user) @user = User.new(params[:user]) user = User.find_by_screen_name_and_password(@user.screen_name, @user.password) if user user.login!(session) if @user

[Rails] Re: Please help --> Getting error ERROR NoMethodError: private method `gsub!' called for #

2012-04-25 Thread Amir Z.
Thanks Colin we are calling it as an object. Please find my login code below. def login if request.get? @user = User.new(:remember_me => cookies[:remember_me] || "0") elsif param_posted?(:user) @user = User.new(params[:user]) user = User.find_by_screen_name_and_password(@user.screen_name, @user.pa

[Rails] ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-04-25 Thread Amir Z.
I am newbie working railspace application, its going smoothly. :)getting something much better in this. I developed code for login logout and registration and code is working fine but as i am running test for it. it is giving following error. "ArgumentError: Bad fixture argument 2 during creation

[Rails] showing error (gsub) when switching from session to cookies

2012-04-25 Thread Amir Z.
I am newbie to rail. Trying to develop social networking site so working with railspace application. Everything is working fine but I stuck in the problem when i am giving the authorization tocken to the user to remember him/her. My Error and controller code is below Error:- private method `gsub'

[Rails] Re: Please help --> Getting error ERROR NoMethodError: private method `gsub!' called for #

2012-04-25 Thread Amir Z.
I am working with railspace social networking application. I did login logout registration process in it but as i am introducing the concept for remember me then stuck in the problem. it is showing the following error. private method `gsub' called for 4:Fixnum C:/Users/Amir/Downloads/IR/ruby/l