[Rails] Re: application error

2016-11-01 Thread Chirag Jain
- wrote: > > run rails -e production > > error like this: > > > Internal Server Error Missing `secret_key_base` for 'production' > environment, set this value in `config/secrets.yml` > > Pada Senin, 31 Oktober 2016 15.54.06 UTC+7, Chirag Jain menulis:

[Rails] application error

2016-10-31 Thread Chirag Jain
Try to launch your app locally in production mode -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post t

[Rails] {JOBS} Ruby Developer

2016-09-06 Thread Chirag Jain
Is it open for remote -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to

Re: [Rails] [Rails 3.2] How to extend a gem model

2015-10-13 Thread Chirag Jain
Try adding require n include statement -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this grou

[Rails] Social auth in rails api

2015-10-12 Thread Chirag Jain
Checkout devise_token_auth -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send emai

[Rails] Beginner level bug in Rails

2015-09-16 Thread Chirag Aggarwal
Hi, I want to contribute in Ruby on Rails. Could someone point me to a beginner bug? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+uns

[Rails] Consuming REST API using Faraday/HTTParty - Tutorial Required

2015-02-21 Thread Chirag Aggarwal
same (recent tutorials will be recommended). Thanks, Chirag -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-tal

[Rails] Splitting documents in heroku

2015-02-04 Thread Chirag Aggarwal
Hello, I am working on a slide sharing application which lets people upload presentations and pdfs and shows them in the browser. The website is hosted on heroku and slides are being uploaded to AWS S3 using CarrierWave gem. Link: SlideSquare http://slidesqua

[Rails] How to log session variables in Rails 3.2?

2012-05-11 Thread Chirag
is added in the log file? Thanks Chirag -- 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/-/pAhkNM8vieAJ. To post to this group, sen

Re: [Rails] Upgrading to Rails 3

2012-04-06 Thread Chirag Singhal
Hi Gurdipe, There is a series of RailsCasts that you can watch to get a reasonable idea of how to approach the upgrade. http://railscasts.com/episodes?search=upgrading+to+Rails+3 Chirag http://sumeruonrails.com On Sat, Apr 7, 2012 at 1:46 AM, Jason Fleetwood-Boldt wrote: > > >

[Rails] i can not get current_user while writing test case with Rspec and Capybara

2012-04-05 Thread Chirag Shah
0 down vote favorite share [g+] share [fb] share [tw] I have to write test case for my one feature listing page and that feature index method has code like below def index @features = current_user.features end Now when i try to write test case for this then it throws error for 'undefined meth

Re: [Rails] Re: Upgrading my application - 2.3.5 to 3.2

2012-01-23 Thread Chirag Singhal
; ActiveSupport::Inflector.inflections do |inflect| > inflect.irregular 'wave', 'waves' > end > > in an initializer > > To add more to what Fred said, you should already have an initializer which is specifically for this purpose, look for config/initializers/infle

Re: [Rails] rails migration from 2.3.4 to 3.1

2012-01-04 Thread Chirag Singhal
when they are ready, but in the meantime, feel free to send across any questions if you get stuck anywhere during the upgrade process. Chirag http://sumeruonrails.com On Thu, Jan 5, 2012 at 12:10 AM, Benjamin Iandavid Rodriguez < ian@gmail.com> wrote: > This episode on railscasts

Re: Re[2]: [Rails] Lost upgrading from 2.3.8 to 3.1.1

2011-12-20 Thread Chirag Singhal
g to do with plugins also, i.e. if you are still using any plugins which aren't Rails 3 compatible. Chirag http://sumeruonrails.com http://blog.sumeruonrails.com > > On Tue, Dec 20, 2011 at 1:15 PM, Ralph Shnelvar wrote: > > Greg, > > > > Tuesday, December 20, 201

Re: [Rails] Re: Anybody willing?

2011-11-26 Thread Chirag Singhal
ideos - http://www.engineyard.com/ruby_on_rails_training/learn_rails3 Chirag http://sumeruonrails.com On Sun, Nov 27, 2011 at 12:29 PM, Phil Dobbin wrote: > On 27/11/11 05:51, "Max" wrote: > > > I recommend the rails tutorial at: > > > > http://ruby.railstu

Re: [Rails] Upgrade to rails 3.1.3

2011-11-25 Thread Chirag Singhal
On Fri, Nov 25, 2011 at 3:16 PM, Colin Law wrote: > On 25 November 2011 09:37, Chirag Singhal > wrote: > > On Fri, Nov 25, 2011 at 2:34 PM, Colin Law > wrote: > >> > >> On 25 November 2011 03:35, Chirag Singhal > >> wrote: > >> > 3.1.1 t

Re: [Rails] Upgrade to rails 3.1.3

2011-11-25 Thread Chirag Singhal
On Fri, Nov 25, 2011 at 2:34 PM, Colin Law wrote: > On 25 November 2011 03:35, Chirag Singhal > wrote: > > 3.1.1 to 3.1.3 is a very small change. So, all you have to do is update > your > > Gemfile. > > Open up Gemfile, and change the version for rails from 3.1.1.

Re: [Rails] Upgrade to rails 3.1.3

2011-11-24 Thread Chirag Singhal
3.1.1 to 3.1.3 is a very small change. So, all you have to do is update your Gemfile. Open up Gemfile, and change the version for rails from 3.1.1. to 3.1.3 and then go to your project folder and run "bundle install" Chirag http://sumeruonrails.com On Fri, Nov 25, 2011 at 1:54

Re: [Rails] ruby/rails training

2011-10-12 Thread Chirag Singhal
EngineYard offers some good training programs, you can look them up here - http://www.engineyard.com/ruby_on_rails_training/ Chirag http://sumeruonrails.com On Thu, Oct 13, 2011 at 4:40 AM, Max wrote: > HI all, > > I was wondering if any of you can recommend some ruby/rails trainin

Re: [Rails] Rails 3 Migration

2011-09-27 Thread Chirag Singhal
/ is a very good reference for jquery functions. Chirag http://sumeruonrails.com On Tue, Sep 27, 2011 at 12:58 PM, Prachi Tripathi wrote: > Hi All, > > I am migrating from rails 2.3.5 to rails 3 ( ruby mode is 1.8.7) and > Jruby 1.6.4 > > In my project ( 2.3.5 version) i have h

Re: [Rails] better looking routes

2011-09-25 Thread Chirag Singhal
Perfect job for permalinks firendly_id should do the trick for you - https://github.com/norman/friendly_id Chirag http://sumeruonrails.com On Sun, Sep 25, 2011 at 12:58 PM, slava wrote: > Hello, > I am trying to replace default restful routes for a few of my models > to something t

Re: [Rails] Re: retrieve app from github?

2011-09-23 Thread Chirag Singhal
On Fri, Sep 23, 2011 at 1:38 PM, Colin Law wrote: > On 23 September 2011 06:02, Chirag Singhal > wrote: > > You have to create new branch locally and pull code from your git branch > > into that one. > > So something like this on your laptop: > > Open up terminal

Re: [Rails] Re: retrieve app from github?

2011-09-22 Thread Chirag Singhal
github repo branch: git pull origin updating_users Alternatively you can also use this command: git checkout -b updating_users origin/updating_users Chirag http://sumeruonrails.com On Fri, Sep 23, 2011 at 10:21 AM, 7stud -- wrote: > Chirag Singhal wrote in post #1023053: > > First yo

Re: [Rails] retrieve app from github?

2011-09-20 Thread Chirag Singhal
your repo page on github, copy the clone url shown there, and use git clone to get your ruby app on your laptop. >From there on, you can continue working same way as you did on your PC. Chirag http://sumeruonrails.com On Wed, Sep 21, 2011 at 11:18 AM, 7stud -- wrote: > How do I retrieve

Re: [Rails] Re: Unable to use mysql with rails

2011-09-08 Thread Chirag Singhal
Looks like the issue is because you are using wrong version of rake. Either uninstall rake 0.9.2 or run any rake commands with a "bundle exec" prefix like this bundle exec rake db:migrate bundle exec rake db:create Chirag http://sumeruonrails.com On Thu, Sep 8, 2011 at 4:39 PM, ven

Re: [Rails] Re: Unable to use mysql with rails

2011-09-08 Thread Chirag Singhal
opment database yet or not? Try rake db:create If those don't work, then run the with --trace option at the end and paste the result here. Chirag http://sumeruonrails.com On Sep 8, 1:30 pm, Chirag Singhal wrote: > > You have to change your config/database.yml file also. > > O

Re: [Rails] Re: Unable to use mysql with rails

2011-09-08 Thread Chirag Singhal
You have to change your config/database.yml file also. Open that and replace "mysql2" with "mysql" everywhere. Chirag http://sumeruonrails.com On Thu, Sep 8, 2011 at 1:51 PM, venkata reddy wrote: > Yes that successfully starts the server. > But when i see

Re: [Rails] Re: Unable to use mysql with rails

2011-09-08 Thread Chirag Singhal
Easiest way to get it to work would be to use mysql gem instead of mysql2 gem. Open up your Gemfile and replace gem 'mysql2', '~> 0.2.11' with gem 'mysql' And open up your database.yml fine and change adapter from mysql2 to mysql Chirag http://sumeruonrails.com

[Rails] Git Issue for change repository

2011-09-01 Thread Chirag Shah
Hello All, I have one git issue which is as below On My server i am using one repo for pull code is abc/myproject.git Now i have fork one repo from abc/myproject.git to chirag/myproject.git and now i want to use chirag/myproject.git instead of abc/myproject.git for pull code on server Is there

Re: [Rails] Math with table rows

2011-08-18 Thread Chirag Singhal
weight to integer/float if you have not defined those columns as just string in the database. Chirag http://sumeruonrails.com 2011/8/18 Cássio Godinho > Lets supose I have a User table, and on this table I have height, weight > and result rows. > In a form I input height and weight v

Re: [Rails] Re: Validates attributes that aren't even being changed

2011-08-18 Thread Chirag Singhal
Try this :unless => Proc.new {|user| user.password.nil?} Essentially it will check if you are sending a password attribute to the user or not while updating the user record and will check for this validation only if password attribute is present. Chirag http://sumeruonrails.com On

Re: [Rails] How to navigate between view using select

2011-08-18 Thread Chirag Singhal
, "name" 6. Course list action should filter the course list based on the institute id, something like Course.find_by_institute_id(params[:institute][:id]) Fix these and maybe you will figure out a solution. Chirag http://sumeruonrails.com On Thu, Aug 18, 2011 at 10:10 PM, kevin

Re: [Rails] Rails 3 :- Need for Authentication with devise and cancan backend mysql

2011-08-17 Thread Chirag Singhal
Read up devise blog and wiki, it would get you started in right direction: http://blog.plataformatec.com.br/tag/devise/ https://github.com/plataformatec/devise/wiki Chirag http://sumeruonrails.com On Wed, Aug 17, 2011 at 2:21 PM, sathish kannan wrote: > Hi to all , > > I am

Re: [Rails] Getting started problems

2011-08-17 Thread Chirag Singhal
Maybe your load paths aren't updated properly after Rails installation. If 'rails server' is not working, then try 'ruby script/rails server' Chirag http://sumeruonrails.com On Wed, Aug 17, 2011 at 10:15 PM, Murtuza wrote: > I am a newbie to Ruby on Rails. >

Re: [Rails] Why don't I get the correct error messages?

2011-08-16 Thread Chirag Singhal
}} to %{message} {{count}} to %{count} and so on Chirag http://sumeruonrails.com On Tue, Aug 16, 2011 at 5:26 PM, Rahul wrote: > This is my model > >class Product < ActiveRecord::Base > > validates_presence_of :title, :description, :image_url > validates_n

Re: [Rails] how to upgrade

2011-08-04 Thread Chirag Singhal
Install rails upgrade plugin and run all the checks to see what changes you need to make to upgrade the app. https://github.com/rails/rails_upgrade Chirag http://sumeruonrails.com On Thu, Aug 4, 2011 at 10:17 PM, Annapoorna R wrote: > hi > can u suggest how to upgrade frm rails 2.

[Rails] Re: Dynamic Inline CSS

2011-08-04 Thread Chirag Shah
You have to store style in some variable and then need to be apply there in div style But do you have conditional border style ? Or white shadow border should be available for all avtar images ? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

Re: [Rails] Migration to rails2 rails3

2011-07-28 Thread Chirag Singhal
Great, copy over the changes and post again if you get stuck anywhere else. Chirag http://sumeruonrails.com On Thu, Jul 28, 2011 at 5:39 PM, Rodrigo Martins wrote: > Chirag, Thank you, > > Differences between the Rakefile to rails2 rails3. > > Rails2 the Rakefile: >

Re: [Rails] Re: Problem with starting Rails. Please help.

2011-07-28 Thread Chirag Singhal
mysql2 won't install on windows, use mysql gem instead. So, change this line gem 'mysql2', '~> 0.2.6' to gem 'mysql' and in your config/database.yml file, change the adapter from *mysql2* to * mysql* for all 3 databases. Chirag http://sumeruonrails.com

Re: [Rails] Re: Problem with starting Rails. Please help.

2011-07-28 Thread Chirag Singhal
looks like you have wrong entry in your Gemfile. Can you attach or paste contents of your Gemfile? Chirag http://sumeruonrails.com On Thu, Jul 28, 2011 at 2:53 PM, Amit Bobade wrote: > Hi Chirag, > > I am still getting error while starting the rails. > <-[31mCould not fin

[Rails] Re: Getting error while using paperclip gem..

2011-07-28 Thread Chirag Shah
Please mentioned more details that what you trying to do with the paper clip gem By this error, only things come that you have not show.erb in your views Or you have to specify any render or redirect in the show method - Chirag Shah -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: Help with ajax call with date_select

2011-07-27 Thread Chirag Shah
discard_day property takes hidden field instead of hide the day select dropdown So instead use discard property, you have to do hide by default on load by javascript or by css - Chirag Shah http://blogofchirag.blogspot.com/ -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] Re: autocomplete depending on input of another field

2011-07-27 Thread Chirag Shah
You can call ajax request on change or on lost focus of the code field For send ajax request you can do observe_field or use remote_function - Chirag Shah http://blogofchirag.blogspot.com/ Angelo Cordova wrote in post #1013448: > Hello everyone > > I have the following problem. >

[Rails] Re: Gem problems

2011-07-27 Thread Chirag Shah
Have you installed both nokogiri versions to your machine ? Brian Jakovich wrote in post #1013456: > Trying to use cabybara and aws's ruby gem and I'm getting this error: > > *Bundler could not find compatible versions for gem "nokogiri": >> In Gemfile: >> aws-sdk depends on >> nokogir

[Rails] Re: upgrading to rails 3.

2011-07-27 Thread Chirag
Try re-installing rails version that you are using, if you have frozen rails in your vendor directory, then remove it and use rails from gem or remove it and re-freeze Most probably this issue is because rails is not installed properly or is not in the right path or has gotten corrupted somehow

Re: [Rails] Migration to rails2 rails3

2011-07-27 Thread Chirag Singhal
the plugin again with: ruby script/rails plugin install git://github.com/rails/rails_upgrade.git No need to use sudo with the command, unless your application directory is owned by root. Chirag http://sumeruonrails.com On Wed, Jul 27, 2011 at 7:54 PM, Rodrigo Martins wrote: > Attached fi

Re: [Rails] Migration to rails2 rails3

2011-07-27 Thread Chirag Singhal
Can you attach your config/environment.rb file and Gemfile? Chirag http://sumeruonrails.com On Wed, Jul 27, 2011 at 5:43 PM, Rodrigo Martins wrote: > when I run the first command you gave me appears the help of the rails, > and apparently does not install, and the second an error. >

[Rails] Re: Experienced Ruby on Rails Developers in Vancouver, BC - Canada

2011-07-27 Thread Chirag Shah
Contact me on chirag(dot)sweng(at)gmail(dot)com -- 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

[Rails] Re: how to get a value of a variable from a controller to different view?

2011-07-27 Thread Chirag Shah
If you redirect your page then you can not get that variable value to your view Only on render you have that variable value And you can not have value in params unless you pass it in the arguments at the time of the redirection - Chirag Shah -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Re: Rails, jquery and Ajax

2011-07-27 Thread Chirag Shah
For work with jquery and rails function you can use jrails plugin - Chirag Shah Paul Bergstrom wrote in post #1013320: > Chirag Shah wrote in post #1013312: >> Why don't you use remote_function() ? >> >> - Chirag Shah > > I used to do that but now I'm trying

[Rails] Re: Run method if association does not exit

2011-07-27 Thread Chirag Shah
You can create by Song.feed.create(:parameters => value) Vitaliy Yanchuk wrote in post #1013290: > Hello people, > > Please advice with, I have some models and they have feeds, feed is a > small presenter for different types of content. > > class Feed >belongs_to :attachable, :polymorphic =>

Re: [Rails] Migration to rails2 rails3

2011-07-27 Thread Chirag Singhal
If you have already upgraded your application to Rails 3, then you have to use the new syntax to install the plugin: rails plugin install git://github.com/rails/rails_upgrade.git or ruby script/rails plugin install git://github.com/rails/rails_upgrade.git Chirag http://sumeruonrails.com On

[Rails] Re: Rails, jquery and Ajax

2011-07-27 Thread Chirag Shah
Why don't you use remote_function() ? - Chirag Shah -- 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 u

Re: [Rails] Migration to rails2 rails3

2011-07-26 Thread Chirag Singhal
Install rails upgrade plugin, it will convert your old routes, environment and other config files to new Rails 3 format. Read the instructions on plugin's homepage for more info. https://github.com/rails/rails_upgrade Chirag http://sumeruonrails.com On Wed, Jul 27, 2011 at 7:00 AM, Ro

Re: [Rails] Re: error of testing redirect in controller

2011-07-18 Thread Chirag Singhal
You may also want to read through Rails guides on testing - http://guides.rubyonrails.org/testing.html#functional-tests-for-your-controllers Chirag http://sumeruonrails.com On Tue, Jul 19, 2011 at 9:34 AM, Chirag Singhal wrote: > Your test can be something like this: > > post :crea

Re: [Rails] Re: error of testing redirect in controller

2011-07-18 Thread Chirag Singhal
Your test can be something like this: post :create, :user => {:email => "test_em...@mail.com", :password => "12345", :name => "you"} response.should redirect_to('confirm') Chirag http://sumeruonrails.com On Mon, Jul 18, 2011 at 7:38

Re: [Rails] error of testing redirect in controller

2011-07-18 Thread Chirag Singhal
You have to send params along with call to post. Since there are no params in post, it goes to the else section of you controller, where you render a action, and response code for render is 200. So the test fails saying that you expected a redirect but got render. Chirag http://sumeruonrails.com

Re: [Rails] Wizard form with different models

2011-07-12 Thread Chirag Singhal
You may also want to check out ruby toolbox, it's a good index for different ruby libraries. - http://ruby-toolbox.com/categories/rails_wizards.html Chirag http://sumeruonrails.com On Tue, Jul 12, 2011 at 8:58 PM, Colin Law wrote: > On 12 July 2011 16:20, Rodrigo Ruiz wrote: &

Re: [Rails] Unable to install Rmagick + rails 2.3.9 + ruby 1.8.7 + windows Xp + bundler

2011-07-12 Thread Chirag Singhal
/rmagick-on-ruby-1-9-1-<http://www.waydotnet.com/blog/2010/02/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/> i386-mingw32-work-d/<http://www.waydotnet.com/blog/2010/02/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/> Chirag http://sumeruonrails.com On Tue, Jul 12, 2011 at 7:37 PM, Mukesh

Re: [Rails] Rails 3 routing errors - how to remove "?format=" so no more 406 Not Acceptable responses?

2011-07-10 Thread Chirag Singhal
Check out the routing guide here - http://guides.rubyonrails.org/routing.html Chirag http://sumeruonrails.com On Mon, Jul 11, 2011 at 2:06 AM, Fed Up wrote: > I haven't been able to find an answer yet, and unfortunately I can't > find anything useful in the API docs to f

Re: [Rails] Set the ruby default version with using rvm

2011-07-05 Thread Chirag Singhal
Try this: rvm use ruby-1.9.2 gem install rails Chirag http://sumeruonrails.com On Tue, Jul 5, 2011 at 12:18 PM, coolesting wrote: > 1. > dengx@dengx-desktop:/$ rvm list > > rvm rubies > >ruby-1.9.2-p180 [ i386 ] > > dengx@dengx-desktop:/$ > > > 2. &g

Re: [Rails] Set the ruby default version with using rvm

2011-07-04 Thread Chirag Singhal
Can you paste the output of "rvm list" here? You have to make sure that you using correct ruby before you install anything. Did you make the changes to your profile (~/.bashrc or ~/.bash_profile) as instructed by rvm? Chirag http://sumeruonrails.com On Tue, Jul 5, 2011 at 11:27 AM,

Re: [Rails] Set the ruby default version with using rvm

2011-07-04 Thread Chirag Singhal
Most likely the case is that it is picking up the rails version installed on your system ruby. Try installing rails again on your rvm ruby Use 'gem install rails', if you use 'sudo' then it will install to system ruby. Chirag http://sumeruonrails.com On Tue, Jul

Re: [Rails] error of "rake test" command

2011-07-04 Thread Chirag Singhal
Maybe your rake installation has become corrupt. Try re-installing it: #Uninstall the current rake gem sudo gem uninstall rake #Install the version that you need sudo gem install rake -v=0.8.7 Chirag http://sumeruonrails.com On Tue, Jul 5, 2011 at 10:18 AM, joanne ta wrote: > > &g

Re: [Rails] error of "rake test" command

2011-07-04 Thread Chirag Singhal
Try using 'bundle exec rake test' instead of just 'rake test' Chirag http://sumeruonrails.com On Tue, Jul 5, 2011 at 10:12 AM, joanne ta wrote: > > > On Tue, Jul 5, 2011 at 12:38 AM, joanne ta wrote: > >> I did not have any test on my project. i just

Re: [Rails] error of "rake test" command

2011-07-04 Thread Chirag Singhal
Please include your test that is failing here. Most probably the issue is that you are expecting a object somewhere in the test, but it is nil instead. Chirag http://sumeruonrails.com On Tue, Jul 5, 2011 at 8:54 AM, Yennie wrote: > Hi, > > I have an error when i use rake test,

Re: [Rails] Re: rake db:create:all gives the error ??

2011-07-04 Thread Chirag Singhal
Open your Rakefile and replace "rake/rdoctask" with "rdoc/task" Install rdoc gem and add config.gem 'rdoc' to your environment file and then you should be good to go. Chirag http://sumeruonrails.com On Mon, Jul 4, 2011 at 10:11 PM, Amrit Pal Pathak wrote: >

Re: [Rails] Edit a model with has_many and at the same time adding a new object associated.

2011-07-01 Thread Chirag Singhal
Checkout these two railscasts, they should get you started in right direction: http://railscasts.com/episodes/196-nested-model-form-part-1 http://railscasts.com/episodes/197-nested-model-form-part-2 Chirag http://sumeruonrails.com On Fri, Jul 1, 2011 at 4:16 PM, Mauro wrote: > I have S

Re: [Rails] Help with cross information between different websites

2011-06-30 Thread Chirag Singhal
Hi Rogrigo What Sergio is trying to say here is something like this: 1. You can have 3 different Rails apps for this, with 3 different databases. And then for the admin app, you can connect to the client app and company app database and pull information from there. For this, you will have to sp

[Rails] Re: Rails Installer Problem

2011-06-30 Thread Chirag Singhal
If you prefer to do these things through GUI, then use "git gui", it will open up a nice gui for you where you can select which files should be committed, specify the commit comments, commit and push to the server. -- You received this message because you are subscribed to the Google Groups "Ru

[Rails] Re: How to play with shoulda with functional testing

2011-06-30 Thread Chirag Singhal
There's a Teach me to code screencast which may be helpful - http://teachmetocode.com/screencasts/shoulda-on-rails/ And some basic documentation on Rails wiki - http://wiki.rubyonrails.org/testing/shoulda Some of the official documentation here: https://github.com/thoughtbot/shoulda#readme https

[Rails] Re: Beginner's question: Rails 3 and MySQL on Windows

2011-06-30 Thread Chirag Singhal
Easiest way to get started with Rails on Windows is to use RailsInstaller - http://railsinstaller.org/ MySQL 5.1 has issues with Rails on windows, so better use MySQL 5.0, while installing either choose the option where mysql exe is added to path or copy libmysql.dll after installation to ruby'

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

2011-06-29 Thread Chirag Singhal
Great, happy to help -- 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/-/FdmeDfdHZLcJ. To post to this group, send email to rubyonrails-talk@googlegr

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

2011-06-29 Thread Chirag Singhal
Make sure that all references to culture model are removed. You can use rails destroy model culture If that still doesn't solve the issue, then please post your test here along with the controller and the model used in the test. -- You received this message because you are subscribed to the Go

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

2011-06-29 Thread Chirag Singhal
Looks like you are using Rails 3. In that case, you should be specifying the gem dependency in your Gemfile. Remove the lines you have added to your environment.rb or application.rb file and the following to your Gemfile gem 'shoulda' or better still, define it as a test environment dependency

[Rails] Re: Trying to upgrade a rails app from 2.3.2 to 2.3.11

2011-06-29 Thread Chirag Singhal
Rename your template from new.rjs.js to new.js.rjs and it should work -- 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/-/rxdCYx2GXiwJ. To post to th

[Rails] Re: Error of DEPRECATION WARNING

2011-06-29 Thread Chirag Singhal
That's not an error, that's a deprecation warning. The plugin is very old and doesn't seem to be maintained. Probably you can have a look at it's forks on github and pick a more updated version. https://github.com/thorny-sun/prawnto/network If there aren't any other deprecated methods used in th

[Rails] Re: rails 3 nested routing without resources

2011-06-29 Thread Chirag Singhal
A direct conversion to the routes you had in Rails 2, would be something like this: match 'level1/level2/level3/:action', :controller => 'level1/level2/level3' match 'level1/level2/:action', :controller => 'level1/level2' match ':controller/:action/:id' There would be a better way of doing th

Re: [Rails] Re: Problem with starting Rails. Please help.

2011-06-28 Thread Chirag Singhal
It will be in your applications root folder. Along with the files like README, Rakefile, etc -- Chirag http://sumeruonrails.com On Wed, Jun 29, 2011 at 12:03 PM, Amit Bobade wrote: > Hi Chirag, > > Thanks for your great help. I have one more question. It may be a silly > one. Y

Re: [Rails] Re: Problem with starting Rails. Please help.

2011-06-28 Thread Chirag Singhal
: adapter: mysql encoding: utf8 reconnect: false database: myapp_development pool: 5 username: root password: password host: localhost in your Gemfile, add: gem 'mysql' -- Chirag http://sumeruonrails.com On Wed, Jun 29, 2011 at 11:32 AM, Amit Bobade wrote: > Thank

Re: [Rails] Re: Problem with starting Rails. Please help.

2011-06-28 Thread Chirag Singhal
directory. Open up a new console and run the server again. As an aside, I have found that RailsInstaller works pretty well for all this default setup on windows. You may want to try it out - http://railsinstaller.org/ -- Chirag http://sumeruonrails.com On Wed, Jun 29, 2011 at 10:57 AM, Amit Bob

Re: [Rails] looping through results of complex query

2011-06-28 Thread Chirag Singhal
Probably because in your select clause, you aren't selecting herd_rations.ration -- 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/-/xlhlA_zkL10J. T

Re: [Rails] Re: serving only controller+action specific css/javascript

2011-06-28 Thread Chirag Singhal
This may look like a quick and dirty way to do this, but might work with minimal effort. Also, this will work only in the scenario where create and update never have their own views - this would be the case most often, but just wanted to highlight it def asset_path_fragment css_action = case

[Rails] Re: Problem with starting Rails. Please help.

2011-06-28 Thread Chirag Singhal
You didn't specify which Rails version you are using. Looks like you are on Rails 3, in that case, on of the following two should work: rails server (shorthand is rails s) or ruby script/rails server You may also want to read up Rails guides, which is very good if you are a beginner and will add

[Rails] Re: rails 3 nested routing without resources

2011-06-28 Thread Chirag Singhal
Hi, The problem is very specific, so would be hard to quickly find a solution with the information you have posted. Would be good if you can post the routes file from your Rails 2 app which used to work fine and the best working version of routes file from Rails 3 app. You may also want to rea

[Rails] Re: Please help me with RailsInstaller

2011-06-28 Thread Chirag Singhal
I have been using rails installer on windows for a while now and it works perfectly fine. So, would be better if you post full error message as Colin mentioned. And also post output of 'gem env' and 'gem list' -- You received this message because you are subscribed to the Google Groups "Ruby on

[Rails] Re: sqlite 3 error

2011-06-27 Thread Chirag Singhal
Do, what it says... run 'bundle install' on your app. Or manually install sqlite3 gem -- 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/-/O0dz0sGQuJE

Re: [Rails] Re: uniqueness_of on many columns

2011-06-24 Thread Chirag Singhal
Can you post your sample data here and if possible your model and controller code? I have used it on several apps, and works just fine for me. -- 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 htt

[Rails] Re: R: Which Ubuntu version is recommended for Rails 3?

2011-06-24 Thread Chirag Singhal
On a server - No, rvm is not required In my experience, Nginx is faster, but Apache is much easier to setup and get going. -- 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.c

[Rails] Re: beginner

2011-06-23 Thread Chirag Singhal
You can also try out Rails tutorial http://ruby.railstutorial.org/ruby-on-rails-tutorial-book It's pretty good and the author got Ruby Heroes Award at this year's RailsConf for his contribution to community There's another great beginner free course by codeschool, which you can try out - http:/

[Rails] Re: Postgresql vs mysql request with Rails 3

2011-06-23 Thread Chirag Singhal
Did some search on it and it's a revelation for me too. Here's what I understand based on all the articles I've read: It's not the problem with DB adapters, it's because of the difference in how MySQL implements "group by" clause http://dev.mysql.com/doc/refman/5.0/en/group-by-hidden-columns.ht

[Rails] Re: Which Ubuntu version is recommended for Rails 3?

2011-06-23 Thread Chirag Singhal
Any Ubuntu version would do. On a production server you should probably stick to LTS releases, which is 10.04 On a development machine you can use the latest release, which is 11.04 Also, on a dev machine it would be better to use RVM (https://rvm.beginrescueend.com/) to install and manage your r

[Rails] Re: RSpec book help; why won't this stub method work?

2011-06-23 Thread Chirag Singhal
count is a class method, so maybe you should try stubbing it on the Message class -- 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/-/1JezJOD5dvsJ.

[Rails] Re: Postgresql vs mysql request with Rails 3

2011-06-23 Thread Chirag Singhal
Can you post your code/query here? -- 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/-/3J8xFe8GX8sJ. To post to this group, send email to rubyonrails

Re: [Rails] Re: How much logic should I add to my ActiveRecords

2011-06-22 Thread Chirag Singhal
Also, you can't define default scope with lambda until Rails 3.1 You can use "unscoped" if you want to override default scope -- Chirag http://sumeruonrails.com On Thu, Jun 23, 2011 at 11:35 AM, Colin Law wrote: > On 23 June 2011 00:33, Andrew Skegg wrote: > >

[Rails] Re: Problem with special characters and CSV upload

2011-06-22 Thread Chirag Singhal
What does file.tempfile return? If it is a file object, then we have a problem, we need to pass in file path here. So call path on the file object and pass that as the first argument. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To vi

[Rails] Re: Problem with special characters and CSV upload

2011-06-22 Thread Chirag Singhal
How about this: file = params[:file] CSV.foreach(file.tempfile, {:encoding => "rb:UTF-32BE:UTF-8", :headers => false, :col_sep => ";"}) do |row| @newhash << {:var1 => row[0], :var2 => row[1]} end -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:

Re: [Rails] Re: How much logic should I add to my ActiveRecords

2011-06-22 Thread Chirag Singhal
It may sound silly simple, but why not just defined a named scope for that and be done with it. Assuming you are on Rails 3 something like this should work: scope :active, lambda {where(["created_at > ?", 10.days.ago])} -- You received this message because you are subscribed to the Google Group

Re: [Rails] Re: Problem with special characters and CSV upload

2011-06-21 Thread Chirag Singhal
ot; with your incoming encoding and "UTF-8" with the encoding you want to parse/store your data in. On Wed, Jun 22, 2011 at 12:11 PM, Sebastian wrote: > Hi Chirag, > > thank you for the links. I will read them and look if there is > something that can help me. > > I fou

Re: [Rails] Re: Checking if file_field is empty?

2011-06-21 Thread Chirag Singhal
As Colin said, you shouldn't be getting the exact same error at the exact same place. Would be good to check it out. Based on the code you posted, you are not using ActiveRecord features in Upload model, so do away with it and use ActiveModel instead. Here's a great Railscast on this - http://r

  1   2   >