[Rails] Re: Restclient error

2015-08-06 Thread Kristian Koci
Are you on MS Windows? El miércoles, 5 de agosto de 2015, 1:06:35 (UTC-4:30), venkata sai Reddy escribió: caught RestClient::SSLCertificateNotVerified: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: -- You received this message because

[Rails] Accepts_nested_attributes_for gives mass assignment error when roles are used

2012-10-24 Thread Kristian Rasmussen
, it works. Is accepts_nested_attributes_for missing the role option from attr_accessible? --- Kristian Rasmussen @iamkristian | iamkristian.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

[Rails] How can I use Rails Erubis templating standalone?

2010-08-25 Thread Kristian Mandrup
::Template. The #render method takes arguments view and a locals, which I think is a Hash. Is this what I should be aiming to use? Any examples of this kind of usage outside Rails? Kristian -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group

[Rails] Re: How can I use Rails Erubis templating standalone?

2010-08-25 Thread Kristian Mandrup
I found the file 'actionpack/template/template_test.rb', which shows how to run simple templates: def test_basic_template @template = new_template assert_equal Hello, render end def test_locals @template = new_template(%= my_local %) assert_equal I'm a local,

[Rails] Re: How can I use Rails Erubis templating standalone?

2010-08-25 Thread Kristian Mandrup
After a lot of experimentation and reverse engineering the Rails 3 ActionView code, I figured out this solution: http://gist.github.com/549965 Hope it can help others with a similar need ;) -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Rails 3 plugin development - recommended practices?

2010-08-21 Thread Kristian Mandrup
I have been thinking that there must be some better ways of doing Rails plugin development than my current approach. currently I tend to have my plugin in one location as a gem and then link to it from my Rails 3 app vendor plugins folder with a symlink. Then I have to carry around the whole Rails

[Rails] Rails 3 plugin development - recommended practices?

2010-08-21 Thread Kristian Mandrup
I have been thinking that there must be some better ways of doing Rails plugin development than my current approach. currently I tend to have my plugin in one location as a gem and then link to it from my Rails 3 app vendor plugins folder with a symlink. Then I have to carry around the whole Rails

[Rails] `method_missing': undefined method `i18n' for #Rails::Railtie::Configuration:0x000001010fce98

2010-07-10 Thread Kristian Mandrup
I have recently upgraqded to Ruby 1.9.2-rc1 and reinstalled rails 3 beta 4 with all the dependencies. I have run bundle install in my rails project. Now I am trying to run some tests... My test_helper.rb file looks like this: # test_helper.rb require 'rubygems' require 'test/unit' require

[Rails] Re: Error when Generating a resource, controller or scaffold - Rails 3 beta3

2010-05-10 Thread Kristian Mandrup
rodrigo3n wrote: Hello Hiroshi, just as I did, you can fix this problem by uncommenting the line 6 of your application's Gemfile. It worked for Ruby 1.9.1p378. It remains buggy on 1.9.2. Thanks. What is line 6 in the Gemfile? Is it a particular gem that causes the problem? -- Posted via

[Rails] Rails problems running rake and other tasks - undefined method `action_controller'

2010-02-25 Thread Kristian
I suddenly have a major problem in all my Rails 3 apps: $ rake db:migrate --trace rake aborted! Don't know how to build task 'db:migrate' /Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/ rake.rb:1728:in `[]'

[Rails] Invalid .gemspec format - multiple gem repos?

2010-02-19 Thread Kristian
kristian-mandrups-macbook-pro:edgier kristianconsult$ rake db:migrate (in /Users/kristianconsult/my_rails/rails3_apps/edgier) WARNING: #NoMethodError: undefined method `' for nil:NilClass # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = %q{abstract} ... WARNING: Invalid

[Rails] Re: Invalid .gemspec format - multiple gem repos?

2010-02-19 Thread Kristian
Found the bug and solution here: https://rails.lighthouseapp.com/projects/8994/tickets/3865-invalid-gemspec-format-in-and-already-initialized-constant-warnings-with-ruby-192dev -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] env: ruby1.9: No such file or directory - FIX

2010-02-19 Thread Kristian
In the root of a rails 3 app: $ rails env: ruby1.9: No such file or directory $ script/rails env: ruby1.9: No such file or directory $ script/rails generate env: ruby1.9: No such file or directory $ ruby -v ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.2.0] $ mate script/rails

[Rails] [Rails 3] How do I use the new hook functionality to hook up multiple generators for scaffolding etc.

2010-02-07 Thread Kristian
on underneath and how it all connects. There are also the :in and :as options for hook_for. How are they used? There is also rules for how the hooks are resolved Thanks for any info ;) Kristian -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Rails 3: bundle install vendor - ffi 0.5.4 gem crashes : ERROR: Failed to build gem native extension

2010-02-07 Thread Kristian
Installing ffi (0.5.4) from rubygems repository at http://gemcutter.org with native extensions /usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/ site_ruby/1.9.1/rubygems/installer.rb:504:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension.

[Rails] Suggestion: Merging Rails application templates with generator functionality

2010-02-01 Thread Kristian
Been working a bit lately on implementing Rails app. templates and generators. It is clear there is a lot of overlap and that features from generators could be used in app. templates and vice versa. I will try to port some of the generator features such as the template function (executing an .erb

[Rails] Re: Best way to connect various applications?

2010-02-01 Thread Kristian
(schemaless DB). I have created a few generators to facilitate this kind of approach... Good luck! Kristian -- 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-t...@googlegroups.com. To unsubscribe from

[Rails] Re: jQuery Rails installation

2010-01-31 Thread Kristian
There are several blog posts on how to use jQuery unobtrusively with Rails. Yeah, don't use the js helpers and RJS if you can avoid it! I'm currently in the process of creating a jQuery application template to install/configure jQuery widgets, jQuery UI and unobtrusive jQuery in a Rails app. Check

[Rails] Error applying template with custom rails3 application generator

2010-01-30 Thread Kristian
kristian-mandrups-macbook-pro:~ kristianconsult$ nifty_app_template_local tryme blip create create README ... create app create app/controllers/application_controller.rb create app/helpers/application_helper.rb create tmp/pids create

[Rails] Re: run 'script/generate controller' from inside app

2010-01-30 Thread Kristian
http://www.gotripod.com/2007/10/07/tip-running-command-line-shell-commands-in-ruby-using-x/ Try this instead: f.each_line do |page| %x[script/generate controller #{page}] end file.close ;) -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Rails rack - mounting multiple web applications

2010-01-30 Thread Kristian
I remember having stumbled upon a tutorial or blog, describing how to mount multiple web apps in a single rails/rack application. Does anyone have any idea where I can find info on how to do this? Thanks! -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Rails 3 App generator - could not find source path

2010-01-29 Thread Kristian
Could not find README in source paths. module Nifty module Generators class AppGenerator Base def self.source_root @source_root ||= File.expand_path(File.join(File.dirname (__FILE__), 'templates')) end def initialize(*args) super end def

[Rails] Re: Rails 3 App generator - could not find source path

2010-01-29 Thread Kristian
Works with this in my Rakefile :) gem.files=FileList['lib/**/*', 'bin/*'] -- 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-t...@googlegroups.com. To unsubscribe from this group, send

[Rails] Re: How to create Rails 3 migration generator?

2010-01-29 Thread Kristian
be possible with migrations. Also see: http://guides.rails.info/generators.html for more details ;) Good luck! Kristian On Jan 29, 9:54 pm, szimek szi...@gmail.com wrote: Hi, I'd like to add Rails 3 compatible generator to acts_as_taggable_on gem (all it does is call migration_template method

[Rails] Creating executable rails 3 generators

2010-01-28 Thread Kristian
the executable passing in any defined arguments as per the generator Commens, ideas, suggestions? Thanks! Kristian -- 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-t...@googlegroups.com

[Rails] Re: Creating executable rails 3 generators

2010-01-28 Thread Kristian
' -- Is there a nice way to fix this? Do I have to create a non-frozen custom options collection or someone has a better idea? Kristian -- 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-t

Re: [Rails] ExceptionNotifier in development mode

2010-01-25 Thread Kristian Hellquist
simply do, somewhere in your controller: local_addresses.clear Tried this? /Kristian 2010/1/24 Craig White craigwh...@azapple.com: I don't seem to be happening here... config/environments/development.rb set... config.action_controller.consider_all_requests_local = false

Re: [Rails] captcha

2010-01-25 Thread Kristian Hellquist
Check http://recaptcha.net/ 2010/1/25 Tom Mac li...@ruby-forum.com: Hi   I would like to know which is the latest captcha gem or plugin in rails. I need to implement one in my registration page Is there any screencasts available for the same Thanks in advance Tom -- Posted via

Re: [Rails] Re: database design question: building features

2010-01-25 Thread Kristian Hellquist
Do you really need the flexible and dynamic scheme of option 2? As long as you only have a few settings I would stick to option 1. You can always migrate your data and move to scheme 2 if required. /K 2010/1/25 Matt Jones al2o...@gmail.com: On Jan 25, 1:28 am, Taylor Strait

Re: [Rails] Time taken by page to load

2010-01-25 Thread Kristian Hellquist
You can check your rails logs. There you will find out how long time your request took in db, rendering views and the total time. /K 2010/1/25 Hemant Bhargava li...@ruby-forum.com: Champs, Is there any way to find out that how much time a page had taken to load itself ? Googled for it but no

Re: [Rails] Re: Re: database design question: building features

2010-01-25 Thread Kristian Hellquist
You could also check up document oriented and schema free databases like couchdb and mongodb if you would like to see your design problem from another perspective. Good luck, Kristian 2010/1/25 Alpha Blue li...@ruby-forum.com: I would look into understanding how to normalize your databases

Re: [Rails] Re: skinny Controllers, fat models with REST?

2010-01-25 Thread Kristian Hellquist
I personally use ResourceController, http://github.com/jamesgolick/resource_controller, for controllers using the REST-pattern, but http://github.com/josevalim/inherited_resources seems very nice too. /K 2010/1/25 Alpha Blue li...@ruby-forum.com: You probably should extend your code by

[Rails] Rails 3 Problem: no such file to load -- rails (LoadError)

2010-01-20 Thread Kristian
I just ran the gem bundle on the third_rails demo app, but for some reason rails can't be loaded!? kristian-mandrups-macbook-pro:third_rails kristianconsult$ rails -v Rails 3.0.pre kristian-mandrups-macbook-pro:third_rails kristianconsult$ script/ generate model Post name:string /Users

[Rails] CRITICAL: Rails 3 error : parser.bundle unhandled exception!!!

2010-01-20 Thread Kristian
kristian-mandrups-macbook-pro:rails3_apps kristianconsult$ rails my_r3 create create README create .gitignore create Rakefile create config.ru create Gemfile create app ... kristian-mandrups-macbook-pro:my_r3 kristianconsult$ script/console

[Rails] Re: CRITICAL: Rails 3 error : parser.bundle unhandled exception!!!

2010-01-20 Thread Kristian
Turns out the problem was with the old version of the json gem! Just needed to upgrade it :) kristian-mandrups-macbook-pro:my_r3 kristianconsult$ sudo gem install json Password: Building native extensions. This could take a while... Successfully installed json-1.2.0 1 gem installed Installing ri

Re: [Rails] Rake Aborted wont Migrate mysql

2010-01-20 Thread Kristian Hellquist
have you tried to connect to your mysql server by the mysql-client? mysql -h localhost -P 3306 -p dbname 2010/1/20 Andrew Perkins li...@ruby-forum.com: Hello all, I've been trying to get ruby on rails to work with my local install of mysql(its with wamp). Windows XP, Ruby 1.8.6, rails

Re: [Rails] Rubyzip gem installed but not recognised

2010-01-19 Thread Kristian Hellquist
try to add `require zip/zipfilesystem' in the ruby file that requires the rubyzip gem 2010/1/19 giorgio george.pever...@gmail.com: Hi, I have installed rubyzip successfully(see output below) Successfully installed rubyzip-0.9.1 1 gem installed Installing ri documentation for

Re: [Rails] dynamic session expiration

2010-01-19 Thread Kristian Hellquist
See the gem restful-authentication 2010/1/19 Tom Mac li...@ruby-forum.com: Hi   in the login page i have a check ox which says Keep me looged in for 1 week . Please guide how can I do this..I am planning to use authlogic Thanks Tom -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Can't get gem bundler to work with either rvm 1.9.1 and 1.9.2

2010-01-18 Thread Kristian
I installed the bundler, no problem - but it seems to have screwed up my gem repository in both cases!? What to do? kristian-mandrups-macbook-pro:~ kristianconsult$ sudo gem install thor /Users/kristianconsult/.rvm/gems/ruby/1.9.1/gems/bundler-0.8.1/lib/ rubygems_plugin.rb:2:in `require

[Rails] Re: Can't get gem bundler to work with either rvm 1.9.1 and 1.9.2

2010-01-18 Thread Kristian
kristian-mandrups-macbook-pro:~ kristianconsult$ gem install thor Successfully installed thor-0.12.2 1 gem installed Installing ri documentation for thor-0.12.2... ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/kristianconsult/.ri/cache/.doc_dirs -- Actually I did

Re: [Rails] Segmenting databases in environments

2009-12-17 Thread Kristian Hellquist
Joins can only be used in one database AFAIK. I dont know how rails will handle it, if the connection used doing the join doesn't have the referenced tables you will probably get an error. Kristian 2009/12/16 mrmanishs man...@acceleweb.com: We have two environments, sandbox and production, each

Re: [Rails] is there a profiling gem/plugin for Ruby on Rails?

2009-12-15 Thread Kristian Hellquist
I haven't tested this myself, but it looks promising: http://timetobleed.com/memprof-a-ruby-level-memory-profiler/ -- 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-t...@googlegroups.com. To

Re: [Rails] redirect without changing url

2009-12-11 Thread Kristian Hellquist
2009/12/11 pankaj pankajbhage...@gmail.com: Hi,   Lets assume we have an url, /controller1/action1.   In the before filter, under certain conditions, I want to route it to /controller2/action2. without changing the url at the client side ie I donot want to use redirect. Please help. class

Re: [Rails] Request methods

2009-12-10 Thread Kristian Hellquist
Maybe you're looking for 'request.env' ? 2009/12/10 ct9a anexi...@gmail.com: hi, guys  I was wondering what sort of methods there are to get request information in rails? In Perl, when using mason, we can use $m-request() or something similar. How about rails? thanks -- You received

Re: [Rails] Things I wish I knew when beginning testing

2009-12-10 Thread Kristian Hellquist
Test the entire stack. Do not just test models. Test/spec models, controllers, and use integration tests/specs. This will give you confidence when developing and literally makes your work 1000 times less stressful. Yes, it takes more time, but it is the ONLY way to develop a reliable app that

Re: [Rails] Re: Dynamic configuration of ActionMailer

2009-12-10 Thread Kristian Hellquist
You could read the desired data from a file or database and update your ActionMailer::Base.configuration before you send a mail. -- 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

Re: [Rails] Re: Dynamic configuration of ActionMailer

2009-12-10 Thread Kristian Hellquist
2009/12/11 pepe p...@betterrpg.com: Thanks Kristian. I've thought about this and what I would probably do is store the information for ActionMailer in a YAML file. Getting the data is not a problem, the problem is how to make ActionMailer use the changed configuration without restarting

Re: [Rails] (Rails 2.3) Upstream mongrel cluster: how to find out mongrel instance (port) which handles request

2009-12-09 Thread Kristian Hellquist
Cant you just do `request.server_port' in controller? 2009/12/9 Thomas thomas.net...@gmail.com: For debugging purpose I find it helpful to see which mongrel out of an upstream cluster, specifically which port number, handles an actual request. For example, let the load balancer operate on

Re: [Rails] Re: (Rails 2.3) Upstream mongrel cluster: how to find out mongrel instance (port) which handles request

2009-12-09 Thread Kristian Hellquist
Does request.env.inspect gives you any hint? 2009/12/9 Thomas thomas.net...@gmail.com: Hi Kristian, this also results in port number '3000', and not in the port number of the upstream mongrel. On 9 Dez., 09:46, Kristian Hellquist kristian.hellqu...@gmail.com wrote: Cant you just do

Re: [Rails] assert_redirected help

2009-12-08 Thread Kristian Hellquist
assert_redirected_to category_path(assigns(:category)) this line for example..when i use it in my code def test_should_create_category    login_as :admin    assert_difference Category, :count, 1 do      post :create, :category = { }    end    assert_redirected_to

Re: [Rails] invalid pointer in libxml xmlFreeNodeList

2009-12-08 Thread Kristian Hellquist
We are running libxml-ruby 1.1.3 and 2.6.32.dfsg-5ubuntu4.2 of libxml2, running on Ubuntu 9.04. Does anyone have any suggestions on how to proceed with fixing the issue? Test with another xml-lib? REXML or Nokogiri, there are probably more that you can try. -- You received this message

Re: [Rails] rubygems

2009-12-08 Thread Kristian Hellquist
Tried this http://kl93.blogspot.com/2008/08/add-and-remove-remote-source-from-gem.html ? -- 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-t...@googlegroups.com. To unsubscribe from this

Re: [Rails] rubygems

2009-12-08 Thread Kristian Hellquist
8, 2009 at 1:17 AM, Kristian Hellquist kristian.hellqu...@gmail.com wrote: Tried this http://kl93.blogspot.com/2008/08/add-and-remove-remote-source-from-gem.html ? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

Re: [Rails] Route error to Admin namespace

2009-12-07 Thread Kristian Hellquist
-- Atenciosamente, Paulo Coutinho. Blog: www.prsolucoes.com/blog Site: www.prsolucoes.com Msn:  pa...@prsolucoes.com 2009/12/6 Kristian Hellquist kristian.hellqu...@gmail.com But local and on my server(passenger) it is ok, and function normal, but on JRUBY i get an error because it is thinking

Re: [Rails] Route error to Admin namespace

2009-12-07 Thread Kristian Hellquist
But my system is an ERP, i have more than 20 controllers. I have to make it for all controllers and actions? I have an application with something like 20 controllers and make all routes explicit for each controller. My actions is in portuguese, not edit but alterar... i put here an example

Re: [Rails] Route error to Admin namespace

2009-12-06 Thread Kristian Hellquist
But local and on my server(passenger) it is ok, and function normal, but on JRUBY i get an error because it is thinking that admin is a controller and clients is a action of admin. My controllers is not restfull, so what i have to do, to correct it? Or what the best method to make the admin?

Re: [Rails] need help for functional testing

2009-12-05 Thread Kristian Hellquist
in functional tests. If you dont trust your test-suite, you are not testing enough :) Good luck, Kristian Hellquist 2009/12/5 sanjanad d_sanja...@yahoo.com: my tests are running with no errors.. but how do i check whether the functional tests i wrote are working..i need please.. require

Re: [Rails] is it ok if i define my login_as in test_helper.rb ???

2009-12-05 Thread Kristian Hellquist
In test_helper.rb you usually put all the global methods and data required, so it looks typically fine to me. Kristian Hellquist 2009/12/5 sanjanad d_sanja...@yahoo.com: is it ok if i define my login_as in test_helper.rb ??? def login_as(admin) @request.session[:admins] = admin ? admins

Re: [Rails] Struggling to delete posts... Can you help?

2009-12-05 Thread Kristian Hellquist
It doesnt looks like the form has the id parameter for the Post. Kristian 2009/12/5 RubyonRails_newbie craigwest...@googlemail.com: Hello there, I am looking to be able to delete posts from within my account page. I have a destroy action within the posts controller, which looks like

[Rails] Getting started with Rake - how do I copy a directory of assets to RAILS_ROOT + /public

2009-09-09 Thread Kristian
I am just getting started with Rake. I am trying to create a rake task from within a rails plugin to copy some asset files (inside /assets in my plugin folder) to my rails application /public folder. How can I achieve this? I am not sure whether to use FileUtils or File. Where AM I in rake

[Rails] Re: Users, Roles and Permissions

2009-08-31 Thread Kristian Mandrup
Why not try Hobo, a rails extension. It includes a pretty decent permission based system using roles... that u can set declaratively for your application. Hobo also include a host of other realy cool features. http://hobocentral.net/ --~--~-~--~~~---~--~~ You