similar to: rake aborted! ActiveRecord::ConnectionNotEstablished

Displaying 20 results from an estimated 500 matches similar to: "rake aborted! ActiveRecord::ConnectionNotEstablished"

2006 Jan 18
15
Anyone got Globalize working???
Hi all In another thread I complain about an error I get after trying to get Globalize working. http://www.ruby-forum.com/topic/51988#new Now I want to ask you, if anybody of you has ever got Globalize working? I have done exactly what''s written in the (absolutely much too short) tutorial of its wiki... http://globalize.diluvia.net/wiki ...and I''m very frustrated that no
2006 Jul 28
3
Forms: handle foreign keys (AssociationTypeMismatch)
Hi all I tried and tried and tried, but I still fail in creating a form with proper validation and stuff for foreign keys... So I''d really like to get some help here. I''m creating a booking site for DJ''s, and for every booking one can choose one of different countries: class Booking < ActiveRecord::Base validates_presence_of :country_id
2010 Mar 17
3
Associating a default paperclip image from a different model
Here''s some code, this is my NewsItem model as you can see... class NewsItem < ActiveRecord::Base belongs_to :country has_attached_file :image, :styles => { :original => ''57x57'' }, :default_url => ''/images/football.png'' # has_attached_file :image, # :styles => { :original => ''57x57'' },
2006 Jul 06
0
Can''t generate AR from script (ActiveRecord::ConnectionNotEstablished)
Generating ActiveRecord instances from the console works fine. ./script/console Loading development environment. >> Pim.new() => #<Pim:0xb74427dc @attributes={"vpimitem"=>nil}, @new_record=true> >> But running this little script: #!/usr/bin/env ruby require File.dirname(__FILE__) + ''/../config/boot'' Pim.new() Will spit out
2011 Dec 01
1
ActiveRecord::ConnectionNotEstablished
Hi All, I am new in ruby on rail. i have successfully Ruby on Rails setup and create application but i have run application in browser everytime display "ActiveRecord::ConnectionNotEstablished " this error . I am using ruby 1.9.3 and below my db connection. # SQLite version 3.x # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem
2011 Mar 25
4
how to solve ActiveRecord::ConnectionNotEstablished
*im using mysql as a database* * * *im getting the error which says that * ActiveRecord::ConnectionNotEstablished in GreetingsController#index ActiveRecord::ConnectionNotEstablished Rails.root: C:/railsdev/hello Application Trace <http://localhost:3000/#> | Framework Trace<http://localhost:3000/#> | Full Trace <http://localhost:3000/#>
2010 Sep 07
3
ActiveRecord::ConnectionNotEstablished error
I''ve attached my database.yml I''ve installed gem install activerecord-sqlserver-adapter But when I navigate to a simple page I get the ActiveRecord::ConnectionNotEstablished error Any ideas what I should be checking? Ruby 1.92 Rails 3 Attachments: http://www.ruby-forum.com/attachment/5016/database.yml -- Posted via http://www.ruby-forum.com/. -- You received this message
2012 Mar 02
0
ConnectionNotEstablished when using connection on AR::Base abstract subclass
I''m using AR outside of Rails and calling establish_connection on an ActiveRecord::Base abstract_class subclass (to protect my connection in case anyone else is using AR). It was working just fine with AR 3.0.9, but I recently attempted to upgrade to AR 3.2.2. Now, when I hit a "nested" query from a has_many, I get a ActiveRecord::ConnectionNotEstablished. If I call
2012 Feb 06
0
Error ActiveRecord::ConnectionNotEstablished
Hello, this morning I was trying to access my app on my computer, but, when I initialize the server and access localhost:3000, this message shows up: ActiveRecord::ConnectionNotEstablished So, I try to access via rails console, but again, another error: felipe@Felipe:~/rails_projects/simple_cms$ rails console
2011 Oct 24
9
ActiveRecord::ConnectionNotEstablished
Hello I am rather new to Ruby and have been following along with the book "Ruby On Rails 3 Tutorial - Learn Ruby by Example - by Michael Hartl". I am currently in Chapter 3 which discusses static pages. In this chapter, I entered the following command into the prompt: "rails generate controller Pages home contact" and everything worked fine. Then the book directs me to
2006 Jan 28
3
App running fine on Webrick, ActiveRecord::ConnectionNotEstablished in lighttpd
My app runs fine on webrick, but I get a ActiveRecord::ConnectionNotEstablished when I try to run it on lighttpd. Here''s the app''s lighttpd config: $HTTP["host"] =~ "(www\.)?mysite\.com" { server.document-root = "/home/pergesuteore/public/" server.error-handler-404 = "/dispatch.fcgi" fastcgi.server = ( ".fcgi" => (
2006 Apr 01
5
Upload a zip using a form and extract if afterwards on srv?
Hi all It like my visitors to be able to upload a zip file (or any other possible compressed file archive) to my server. After upload, my web app should extract the content to the server and delete the zip file. Is this possible somehow? I''m very thankful for help. Have a nice weekend, Joshua -- Posted via http://www.ruby-forum.com/.
2006 Jan 12
9
Scaffold shows all attributes altough I use attr_accessible!
Hi all I have a Model like this: class Member < ActiveRecord::Base attr_accessible :username, :email, :first_name, :last_name end I have created a scaffold using script/generate scaffold member members Using the URL localhost:3000/members/edit/1 I can edit all attributes, including created_at, lock_version etc.! But it should only show the attributes I listed in attr_accessible! What
2009 Oct 13
9
Nokogiri: to_s WITHOUT html surrounding's tags?
Hi all n = Nokogiri::HTML("<h1>H1</h1>") n.to_s # => <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><h1>H1</h1></body></html> Is there a method that only outputs the stuff I''ve read, and not the whole valid XHTML stuff?
2006 Jan 23
5
validates_uniqueness_of :username, :if => !self.new_record?
Hi all I want users to register on my page. To register, they only have to deliver an email and a password. Then a link with an activation token will be sent to them, and after clicking the link the user sees a page where he should fill in further details, means: a username. My model looks like this: class Member < ActiveRecord::Base validates_presence_of :username, :if =>
2008 Jul 30
4
AssociationTypeMismatch: Genre expected, got String
Hi all I have the following 2 models: class CompactDisc < ActiveRecord::Base belongs_to :genre end class Genre < ActiveRecord::Base has_many :compact_discs end I have created a select box for my form so I can choose a genre for every compact disc: <p> <b>Genre</b><br /> <%= f.select :genre, Genre.find(:all).collect{|p| [p.name, p.id]}, :selected =>
2006 Jan 11
7
before_filter: how to give :except more than 1 value?
Hi all I have the following class: class MemberController < ApplicationController before_filter :authorize, :except => :index def index ... end Now I want to give the before_filter more than one :except argument. I tried :except => {:index, :login}, but this didn''t work. How can i accomplish this? Thanks a lot and have a nice day, Josh -- Posted via
2006 Jan 24
9
ActionMailer: Mail isn''t delivered
Hi all I used the search for this, but I got an Application Error, so sorry for the newbie question. I have tried to send an e-mail using ActionMailer. I have to following config (environment.rb): ActionMailer::Base.server_settings = { :address => "mail.psyguide.org", :port => 25, :domain => "mail.psyguide.org", #:authentication => :login, #:user_name
2006 Mar 21
5
Use select_date for my model?
Hi all I have a model "party" that has a time field "starts_at". I have created a form to add new instances of this model. <%= select_date Date.today, :prefix => ''party'' %> Sadly I get the error: NoMethodError in Parties#add undefined method `month='' for #<Party:0x256a600> How can I fix this problem? I remember that I saw in
2006 Jan 19
5
123 * 3 => 123123123! But why?
Hi all I extended the Globalize Plugin the following way: -------- module Globalize class Currency def conversion_rate code = Locale.active.currency_code rates = { :USD => 1, :CHF => 0.75, :EUR => 1.1, :GBP => 3.1 } value = rates[code.to_sym] raise "No conversion rate found for currency