Seed is a JavaScript interpreter and a library of the GNOME project.
Questions tagged [seed]
632 questions
0
votes
4 answers
How to determine if an array is saved in rails?
In my seed.rb
puts 'DEFAULT Categories'
categories = Category.create([{name:'cat1'},{name:'cat2'}, {name: 'cat3'} ])
if categories.save
puts "categories saved"
else
puts "categories save failed"
end
I use this to set the default…

ZK Zhao
- 19,885
- 47
- 132
- 206
0
votes
1 answer
Rails Seed.rb ncoding::UndefinedConversionError: "\xC2" error when importing CSV
My seed file looks like this...
csv_file_path = 'db/coned.csv'
count = 0
CSV.foreach(csv_file_path) do |row|
row = Section.new({
:supervisor => row[0],
:catagory => row[1],
:title => row[2],
:description=> row[3],
:days =>…

Mark Locklear
- 5,044
- 1
- 51
- 81
0
votes
1 answer
Expected /...path.../projects_users.rb to define Projects_users
What I'm trying to do is to create posts in a relational table called 'projects_users' with the seed, but after a 'rake db:seed' the following error is thrown:
Expected /...path.../projects_users.rb to define Projects_users
projects_users.rb:
class…

holyredbeard
- 19,619
- 32
- 105
- 171
0
votes
1 answer
Not saving the first seed data from my seed.rb file in Rails 3
I wonder why the first data which is the agency, wasn't saved even if the syntax is just really correct.
Please take a look at my seed file:
db/seeds.rb
Agency.delete_all
puts "Creating agency: agency@example.com..."
Agency.create(email:…

xirukitepe
- 1,575
- 7
- 26
- 54
0
votes
2 answers
Rails : Database Seed
I have a rails app in which there is a lot of data in the database. I have come to realise that on heroku only PostgreSQL is supported. Now my database is MySQL. Is there any way I can get rails to copy all the data from the database into the seed…

Muhammed Bhikha
- 4,881
- 9
- 36
- 47
0
votes
1 answer
JavaScript to sort tournament seeds
I have used some posts on here to create a tournament bracket system using JavaScript and Jquery to show the brackets.
I have 16 teams seeded 1-16. At the moment my sorted seeds are as follows:
[1,8],[4,5],[2,7],[3,6]
As you can see, it works to…

germainelol
- 3,231
- 15
- 46
- 82
0
votes
2 answers
Java Random Number Generator using a Seed
Possible Duplicate:
Java random always returns the same number when I set the seed?
Java Random Numbers Using a Seed
Hi,
This is my code. I am trying to generate 2 random numbers simultaneously using a seed i.e. 15416640. The numbers that are…

Rahul Bhatia
- 1,005
- 2
- 13
- 18
0
votes
1 answer
Make CURAND generate positive different random numbers less than a specific number
I am trying to use CURAND library to generate random numbers which are completely independent of each other. Hence I want to give different seeds to each thread.
So, Question 1: How do I give different seeds to each thread?(Is there some time…

user1439690
- 659
- 1
- 11
- 26
0
votes
1 answer
Seed generator for rand function in matlab
Possible Duplicate:
How to set custom seed for pseudo-random number generator
I'm trying to set the seed generator for rand() function in Matlab but I didn't find the way.Someone could help me?Despite I read the help for that function I didn't…

user1508419
- 333
- 1
- 4
- 14
0
votes
1 answer
Rails Seed Data not loading properly after migration
I loaded some seed data in using the code below, and it worked fine. Then, I needed to add two more columns, and I did so using the following steps, but it's not attaching the two new columns seed data to the table, what am I doing…

sacshu
- 397
- 9
- 20
0
votes
1 answer
How to seed a model (using the seed-fu gem) that has been translated using the globalize3 gem (Rails)
In a Ruby on Rails app, how would one seed a model (using the seed-fu gem) that has been translated using the globalize3 gem?
I tried seeding both the table and translated table with the code below, but it didn't work.
fixtures:
products.rb
…

diasks2
- 2,033
- 2
- 36
- 61
0
votes
0 answers
Stack Overflow and a Seed
I have a procedural program that creates a puzzle from a seed. As usual this seed is derived from the system time and I use it to debug a specific puzzle if I want to revisit it. Recently though, an error occurs very so often "An unhandled exception…

Behemyth
- 195
- 3
- 13
0
votes
3 answers
Creating Users / Passwords in db:seeds in Rails
Curious whether or not it is a bad idea to create Users with password in db:seeds for development?

botbot
- 7,299
- 14
- 58
- 96
0
votes
1 answer
How does one make a custom seed Rakefile
I'm looking to take some yml :
My Random Name of a Topic:
Color:
Brown
Blue
Green
Style:
Thin
Fat
And I'd like to make a Topic object, and an Item object for all the words in Type and Style combined.
Each of those words…

Trip
- 26,756
- 46
- 158
- 277
0
votes
1 answer
Getting a name error when seeding a database in ruby on rails. How do I include app context?
I have a seed script called load.rb in the db directory of an application. I just got this app from a client so not sure how to run this script. I get a name error on all of the Model.create(...) statements. I guess this is because the Rails…

Tony
- 18,776
- 31
- 129
- 193