similar to: How to call UNIX environment variable in rails

Displaying 20 results from an estimated 70000 matches similar to: "How to call UNIX environment variable in rails"

2009 Jan 13
2
Connect multiple DB in rails project using AR
Dear all I have a rails project which database connection is defined in database.yml. There is a table call "servers" which have about 40 records, which is a collection of database setting (i.e. Server.name, Server.port, Server.host) I know the way to establish multiple connection as below... class A < ActiveRecord::Base end A.establish_connection(a) # a is the database config
2009 Feb 24
4
Cannot pass id field to ActiveRecord
Dear all I have a dummy question. The model code as follow: class User < ActiveRecord::Base set_primary_key "username" end In script/console user = {:username => "123", :display_name => "345"} => {:username=>"123", :display_name=>"345"} a = User.new(user) => #<User username: nil, display_name: "345">
2008 Nov 28
1
Rails Beginner.. NoMethodError
Dear all I encounter error when I login my Web application NoMethodError in AdminController#login undefined method `get_title'' for #<Class:0x63ac78> Here is part of my code controller/admin_controller.rb def login session[:user_id] = nil if request.post? if User.authenticate(params[:name], params[:password]) user = User.find_by_name(params[:name])
2008 Nov 21
2
How to install the plugin manually?
Dear all I would like to install plugin auto_complete but failed.. jruby -S script/plugin discover C:/jruby-1.1.5/lib/ruby/1.8/open-uri.rb:278:in `open_http'': 407 Proxy Authentication Required (OpenURI::HTTPError) I have set the http_proxy=http://user:password@host:port/, It is working fine to fetch gem files. I know the plugin is in here:
2008 Dec 10
12
image_tag cannot show picture
Dear all I am new to rails. In view, I place the following code, but cannot show the picture in the webpage <%= image_tag("green.JPG") %> However, I can access the picture in this url http://localhost:3000/images/green.JPG The HTML source code generated <img alt="Green" src="/images/green.JPG.?1228211220" /> I cannot identify the problem. Please help
2008 Dec 05
9
Bar Chart in Rails
Hi Everyone, Can anyone tell me how to draw a bar chart in Rails? Is there any in-built method in Ruby on Rails (or) should i go for 3rd party plugins? I searched and came across this "open flash chart" - i don''t know how to customize it according to my requirement. PS: I have attached my requirement sample for you reference. Thanks, Vasanth Attachments:
2009 Mar 17
11
Refactoring module
Dear all Please see the following module, In module SX3 SX4 and SX5 have similar class Tasklist, but inherit from different class. I will use the following code to connect to different data sources RemoteSX3Model.establish_connection sx3_hash RemoteSX4Model.establish_connection sx4_hash RemoteSX5Model.establish_connection sx5_hash How can I refactor my code in module to look simpler? Thank you
2008 Nov 18
1
Missing js.erb template
Dear all I am new to web development, and I am working on some simple ajax function and got the following error that may need your expert opinions. Missing template ecpath_app_version/__version_list.js.erb in view path D:/Ruby/test/ssc_1/app/views I know there is no js.erb file in app/view/<controller> folder, and I don''t know what content should be in the js.erb. Are there any
2013 Sep 18
3
pxechn.c32 halting
I upgraded from syslinux 4.x to syslinux 6.01 and am now having issues with pxe chaining. I've tried moving up as far as 6.02-pre16, but I'm still experiencing the same problem. The original config called the next server as follows: LABEL Cobbler KERNEL pxechain.com APPEND 10.x.x.x::pxelinux.0 Which worked for the previous version, but I started getting an error after
2008 Feb 22
1
Port listening, cron jobs and loading rails environment
Hi, As part of a web application that I am writing I need to have something listening for any packets that are received on a particular port and then process the packets using some of my Rails models, hence I start the script via the ./script/runner command. This script always needs to be running, if it exits for any reason, I need it to start up again very quickly. Hence, I was considering
2007 Oct 25
8
report generation in rails
Hi is there any way of generating reports other than xls and pdf. I am using my sql . -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2009 Mar 17
3
Disabel "pluralize_table_names" in Rails 2.3.2
What is it in Rails 2.3.2? ActiveRecord::Base.pluralize_table_names = false -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe
2008 Jun 03
15
Problem with rails environment with cygwin...mysql doesn't
I have rails 1.2.2, ruby 1.8, mysql 5 and Rad Rails in my win XP and this stack works fine. But I''m trying to use rails 2.1, mongrel, capistrano, git, mysql all in cygwin and e Text Editor.The only think that doesn''t work is mysql.I installed this app from the source(in version 5.0.45, ./configure then make install).All right, but when I try to launch this error occurs:
2008 Apr 24
3
Dynamically Naming a Variable
Hello, I would like to dynamically name a variable... for example, in my program, I iterate over a SQL query that gives me ''displayname'', ''phone_office'', and ''phone_mobile'' (in the actual query there are many more columns). For each row in the results, I want to create an array with [0]=''phone_office'' and
2009 Apr 13
5
Ruby 1.8.7 + Rails 2.3.2 + TLS = Where's the documentation?
After spending a few hours reading dozens of blogs and tutorials I am still stumped. Numerous sites mention ruby 1.8.7 and rails 2.3 supporting TLS out of the box. However, I can not find any documentation on setting this up to send emails correctly. Furthermore, after attempting to send emails using Gmail and TLS i get the following error: 530 5.7.0 Must issue a STARTTLS command first.
2009 Jun 05
6
rails 2.3.2
Hi all, I am using rails v.2.3.2 and if I put following line to my ApplicationController: include LoginSystem and I moved my login_system.rb to lib folder: module LoginSystem protected def is_logged_in? @logged_in_user = User.find(session[:user]) if session[:user] end def logged_in_user return @logged_in_user if is_logged_in? end def logged_in_user=(user) if
2008 May 07
9
Newbie book recommendations for Rails 2.0.
So Agile rails development (covering rails 2.0) is out In October, in the mean time what book should a newbie (with some asp/asp.net development) buy? Please don''t recommend any Pdfs as I have zero use for anything that isn''t in dead tree format. Thanks in advance, --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2008 Jul 07
5
Creating a rails project
Hi, I''m just starting with Rails today... type this in the command prompt: rails C:\Documents and Settings\user\Desktop\file Then it displays... create x, create y, etc... But when I check the desktop, I see no folder. Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2008 Mar 08
9
Newbie worries with "Developing Rails Applications on Max OSX Leopard"
Hello There, As a new comer to RoR, I started to follow the article http://developer.apple.com/tools/developonrailsleopard.html. In short you create to entities and one one-to-many relation linking them. Everything was good until the establishment of the relation. I am unable to go any further than "Linking Models Together" : I can create the "vendors" mentionned in the
2009 Apr 19
15
Not quite a rails question but can anyone advise?
Hey guys! I''m having a little trouble trying to integrate RMagick with my rails app. In the online terminal (on my host''s server) if I write: export "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" before opening the rails console then I can require "RMagick" no problem. Without adding usr/local/lib to the LD_LIBRARY_PATH I get the error message described