Displaying 20 results from an estimated 30000 matches similar to: "how to share variables in data migrations (up/down)"
2010 May 21
8
Designing An Application (UML, Class Diagrams)
Hi
Is there any freeware anybody would recommend for showing database
models and how they relate to each other? I''m picking up an app
another developer left in a mess and I''m trying to sort it out.
Diagrams would be a great help.
Suggestions?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
2010 Dec 06
15
Windows new installation - Always problems
I would like to know if there is a way to ''package'' an application
with all the associated gems and ship it to a new server and having it
to "just work" in a Windows environment.
Although I have never done it I know that Rails can be frozen into the
application. I am wondering if I can do the same thing with other
gems. I have found this
2010 Jul 02
22
MySQL not Connected ...... *pull hair*
I''m trying to run " rake db:migrate " and im getting an error back:
------------------------------------------------------------------------
C:\wamp\www\demoproject>rake db:migrate
(in C:/wamp/www/demoproject)
rake aborted!
Mysql::Error: query: not connected: CREATE TABLE `schema_migrations`
(`version`
varchar(255) NOT NULL) ENGINE=InnoDB
(See full trace by running task
2009 Dec 23
4
html parser / assertions in a model
I am using http.get in a model to parse html code returned from a Oracle
server.
My first try was to use assertions (assert and assert_select) to test
and parse the html code. But I have problems including the methods in
the model. Have tried both "include" and copy/paste to get assertion
methods into my model. Works as a model, but I get load errors when I am
using the model from a
2010 Jun 28
4
Downtime notifier
What methods do people use to notify users of upcoming downtime in an
application, and for handling requests nicely while scheduled downtime
is occurring? My Google-fu is not yielding me anything useful-looking.
--
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
2010 Apr 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor
In Expense#new there''s a form with a Vendors-drop-down and a NewVendor-
button.
The latter button brings up Vendor#new.
The Create button in Vendor#new brings up Vendor#show with Edit & Back
links.
I want to append a third link conditionally to Vendor#show: if the
Expense#new form led to the Vendor#show
2010 Dec 06
57
Which RoR to run on Mac OS X for a particular RoR app.
I am extremely new to RoR, I am. I am slowly but surely learning Ruby
and the Rails concepts but the environment is confusing.
I have an application that was written for my company in RoR. It is on a
ubuntu server that is going to be shut down. I want to move the app to
my two Macs (one Leopard and one Snow Leopard). We want to keep the app
to demo a business concept but it can run locally
2010 Dec 06
10
testing chapter: agile web dev withrails
I am working my way through Agile web development with rails and I''m in
the testing chapter.
when I run the following test(or any other test)
I''m new and not sure where to start looking.
require ''test_helper''
class ProductTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
I
2010 Sep 01
4
deprecation warning in Rails 3 about Base.named_scope
I recently upgraded to Rails 3, and this error has come up
ubiquitously:
DEPRECATION WARNING: Base.named_scope has been deprecated, please use
Base.scope instead.
Any ideas on how to get rid of it? Or should I just wait for
something?
There''s actually no place in my application where the code
"Base.named_scope" exists, so I assume the problem is inherent in gems
that
2012 Sep 21
9
Using PostgreSQL with RoR on windows. Help!
So I just got involved in a huge team project with RoR and PostgreSQL.
But I can''t find anywhere on the internet to find a proper way to put
them together. I did find one but it is for iOS :-/
http://railscasts.com/episodes/342-migrating-to-postgresql?view=asciicast
I have them both installed and the gem package for postgres also. the
database.yml is already configured. I just
2010 Jul 02
6
making something available application wide
I''d like to display a banner on every page. Ultimately I''ll be tweaking
which banner is displayed via different controllers but initially I''d
just like to set a single banner application wide and display it in my
"_header", a partial I include in all layouts.
I''ve got a BannerAdvert model, simple. If I''m in my welcome controller
index action
2011 Jan 02
6
Database Design
Hello,
I have a user table that stores their username, email address, and
password. (along with salt, etc)
However, now I want to have more complex information associated with
each user (address, etc). I''m no DBA expert, so in terms of
performance, which is better:
- A user table that has all the fields in it (Username, Email,
password, country, state, zipcode, etc)
- A user table that
2013 Oct 29
3
rake db:migrate debacle
Hi there - I''m a ruby newbie and am stuck on the Getting Started with Rails
app. See output below. Problem arose when I ran the rake db:migrate
command. I also tried the ''rake db:migrate RAILS_ENV=development'' command
which may be obvious. Any ideas on how to fix this?
Many thanks!!
$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0]
2012 Jul 07
18
Problem processing text file after uploading
I''ve got a web-app currently partially working. The user uploads a .txt,
.docx or .doc file to the server.
Currently the model handles those files, saves some metadata (the
extention and orig filename) then saves the file to the hard drive. Next
it converts the doc and docx files to plain text and saves the output to
a txt file.
My problem is I want to copy the plain text contents of
2010 Sep 16
6
acts_as_solr plugin fate?
Just wanted to see if I was using the latest acts_as_solr plugin, but
the URL <http://acts_as_solr.railsfreaks.com/> takes me to a GoDaddy
domain parking page.
Anyone know what''s happened to railsfreaks, and more particularly
this plugin?
--
Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
twitter: @hassan
--
You received this
2010 Mar 07
8
Parsing XML file with no style info with Hpricot
Hello,
I''ve been trying for hours to parse an XML using Hpricot. Usually it''s
not a problem. Here''s my simple code:
#This works and outputs the proper xml data
@url1 = ''http://www.sportingnews.com/stories/sportingnews/MLB/rss.xml''
@page1 = Hpricot(open(@url1))
<%= @page 1 %>
#This does not work, and I''m scratching my head
@url1 =
2010 Aug 14
10
Redirecting after logging in
Hey everybody,
I''m trying to make an example of a small networking site, and when I log
in a user, it should redirect and show his profile, but I get the
following error:
NoMethodError in User#index
Showing app/views/user/index.html.erb where line #5 raised:
undefined method `screen_name'' for nil:NilClass
Extracted source (around line #5):
2: Your basic information
3:
2012 Jul 21
3
Attributes in classes db/migrate or app/models
Hello,
I''ve got some experience in Java, and recently, I''ve begun to practice
with Rails.
One of the things that has surprised to me, after I''ve read some books,
it''s that classes hasn''t got attributes; the attributes are in the files
db/migrate/*. After that, the ORM makes the mapping with de Database.
But the attributes aren''t in the files
2010 Jul 20
20
render :js => "alert('Test !')"
Hi Folks,
I use render :js => "alert(''Test !'')" in my modele, but instead of
having the alert displayed, the browser try to donload a file containing
this string : <<render :js => "alert(''Test !'')">>. Do you know why I the
browser behaves such a way ?
Regards
--
Posted via http://www.ruby-forum.com/.
--
You received
2012 Sep 04
5
Associations and Math between Models
I''ve setup two models, 1 and 2, that are associated by
has_and_belongs_to_many. I''m trying to get an attribute from model_1 to use
in a method in model_2. When I use the code below, I get an error saying
''undefined method model_1_id''. What am I missing? Thanks!
Model_2.rb
Class Model_2 < ActiveRecord::Base
...
has_and_belongs_to_many :model_1
def