Tagged Questions
0
votes
0answers
35 views
oracle sql developer not storing unicode
I am inserting a text field from a mysql database into an oracle clob column.
When I do this it appears that the oracle table does not support unicode as the ' and " characters are showing up as ???.
...
0
votes
2answers
36 views
schema.rb and mysql database issue in ruby on rails
First of all, I've been learning Rails for 8 months but feel like I started yesterday, so please bear with me. I'm trying to resolve why my value, called visible, isn't functioning correctly. I'm ...
0
votes
0answers
11 views
Implementing performance testing on rails app throwing MySql error
I am attempting to implement performance testing with my rails 3 app. I have added:
gem 'ruby-prof'
gem 'test-unit'
to my gemfile, and have ran bundle install. In my test/performance directory I ...
1
vote
1answer
21 views
migrating database from development to production - rails
Sorry if the question seems too simple, but I am quite new to rails. I generated scaffold in development mode. Then I migrated the database and it edited the mysql app_development table but not the ...
1
vote
2answers
25 views
'Connect' a rails app to an already existing MySQL DB?
So in my company we are slowly moving to Rails instead of PHP(Code Igniter to be precise).
So, our actual PHP App is using a Mysql DB and I'd like to connect a new Rails app to this DB but meanwhile ...
-4
votes
1answer
20 views
How do I display information(in view) from mysql database table in rails [on hold]
database name(created in mysql): databasename1
tables(created in mysql): table1 and table 2.
I want to display related information in my home screen(index.html.erb).
For example:
User ID: (id ...
0
votes
2answers
24 views
How to make mysql event scheduling with ruby on rails? [on hold]
My bank account is depositing automatically with my account balance profits each month in the same time./
I want to make an application to do the same job. I want to know what the workflow is and what ...
0
votes
2answers
22 views
app can't connect to local MySQL - osx
I am running some rails app on osx, but when I launch a rails generate command type, I get this message :
/$root/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': ...
0
votes
1answer
22 views
How do you write a Rails cron job Whenever gem?
The whenever gem is installed. I see all kinds of cron and whenever tutorials about scheduling tasks with minutes, hours, days etc. I watched the railscast video on cron/whenever.
But I've yet to find ...
1
vote
4answers
43 views
Rails multitenant architecture, migrating from single-tenancy
We have a single-tenant database architecture at the moment with MySQL running upward of 100 databases. We switch database connection on subdomain using the Apartment gem and all is dandy!
However, ...
0
votes
1answer
27 views
rails server works… but cannot generate scaffold
I ran my rails app correctly with rails s -e production, but when I run rails generate scaffold Campaign title:string owner:string I get
...
1
vote
0answers
41 views
How can I convert MySQL latitude / longitude data to JSON using Ruby on Rails
Thanks in advance for any help you can provide on this question: How can I use Ruby on Rails to create a JSON object from the "latitude" and "longitude" data in my MySQL table, "Locations"?
My ...
-2
votes
0answers
12 views
Where to write queries with devise gem? [on hold]
I have been given a rails application that uses devise gem to integrate the databases. I need to write some queries, and since I'm a newbie, I don't know where exactly I need to write the queries!
...
-1
votes
0answers
29 views
Improve performance of remote database query via API [on hold]
Basically, there are three web application which hosted in different server.
In my web application, I need to generate kind of report which need to trigger query from these three databases which they ...
0
votes
2answers
35 views
Creating a Mysql user within a Rails controller action
Working on an app that wil be used by admin only to create multiple instances of another app.
In other words, app A will be used to create clones of app B on server and create all the configurations ...
-2
votes
2answers
21 views
find value in sql table in rails [on hold]
I have a table in sql such as
id app form
1 num1 /form1.doc
2 num2 /form2.doc
I want to search the table and get the form corresponding to num2 app
I am currently doing
path = ...
0
votes
0answers
42 views
Speed up my rails app
I have a very big rails app, it works very well, but there is a page that is very slow! It takes something like 2 minutes to complete the loading.
The page contain a calendar, where I insert a lot of ...
0
votes
1answer
16 views
CSV file upload cancel Ruby on Rails
Im wondering whats the best way to handle this.
I have a form_for with a couple of text_fields to fill and with a form.file_field(:file) , so a user can upload a csv file into the database. There is ...
1
vote
2answers
21 views
Is there a reference table which shows which mysql versions are supported by which rails versions?
Where should I be looking to find which rails versions support which mysql versions?
-4
votes
0answers
44 views
How do I create a MySQL database for a Rails application? [closed]
I am trying to build a simple web application using Ruby on Rails to teach myself how to code a free project for learning.
This is my first time creating a relational database and trying out OO ...
0
votes
2answers
42 views
Rails/SQL - excluding objects from joined queries
I am writing a Rails app in which users can test themselves using a database of questions. I have tables for Users and Questions. When a question is answered a QuestionAttempt object is created, ...
0
votes
0answers
20 views
Rails MySQL Connection Problems
I am having an issue connecting to the mysql database using rails. I'm a newbie to rails but I have tried the guide here:
rails + MySQL on OSX: Library not loaded: libmysqlclient.18.dylib
and this ...
0
votes
2answers
39 views
Can't Connect to remote Mysql server in Rails, but I can connect to it with command line client
I have a remote Mysql server, and got all privileges remotely. Here is the output of "show grants" after I logged in remotely, from local computer:
...
0
votes
2answers
34 views
Rails get the id of the inserted row (not the last inserted) [duplicate]
In my model I have code that looks like this:
Report = Report.new()
Report.Name = name
Report.save()
This process happens several times in a second in parallel. If I get the last inserted id it ...
0
votes
1answer
19 views
Data dump filetype for not-yet-existant SQL database
A friend wants to start scraping data for a data-heavy site he wants me to try to build. I'm a (relatively new) Rails developer and don't know much about the data side of all this. If he's contracting ...
0
votes
0answers
17 views
Simple forum app order by latest by most recent, Ruby/Rails/MySql
What I have is Posts which has_many Comments. I want to mirror the ordering of a conventional forum, where the most recently created objects are at the top, be it a new Post with no comments, or an ...
0
votes
1answer
39 views
gem install mysql not working. But i'm able to connect to mysql -u root -p
I'm using ubuntu based backtrack OS. I have mysql installed and i'm able to stop, start, connect to mysql.
mysql -u root -p
works fine and able to create database and could be able to see data in ...
0
votes
1answer
34 views
Rails: How update a model without Table
I have to update a table without Model.
Say, name of the table is "users".
If it has a Model I would update it like:
obj = User.find_by_email "[email protected]"
obj.name = "norman"
obj.save
But it ...
3
votes
2answers
56 views
Should I process a large amount of data with SQL or Ruby? [closed]
I have a MySQL table with hundreds of thousands of entries in it.
I need to specify a date range and select all the entries between those two dates. I then need to break down the entries hour by hour ...
0
votes
1answer
36 views
Rails ActiveRecord find User where Products equals 0
I have a model User that has_many Product(s), but some Users don't have any products yet. I want to write a query that gives me all the Users who don't current have any Products i.e. a User where ...
0
votes
0answers
35 views
“Aborted_clients” on Rails 3.2, mysql2 gem, Amazon RDS (mysql)
Two weeks ago we migrated our database from a postgres instance hosted on the web server to a mysql instance hosted on Amazon RDS.
After the migration, we started experiencing "Lost connection ...
0
votes
1answer
21 views
Using Sequelize along with ActiveRecord
I'm working on a project in which we have a main website developed using RoR and, in the other hand, we have a NodeJS server receiving/sending information. Both platforms use the same MySQL database, ...
0
votes
2answers
29 views
Can't connect to remote mysql server from rails
When I run:
bundle exec rails c
I get
Mysql2::Error: Access denied for user 'root'@'$HOST' (using password: YES)
despite the fact that this works just fine:
mysql -h $HOST -P $PORT -u root -p
...
0
votes
0answers
78 views
Can't connect to MySQL server on '127.0.0.1' (61)
This is really hard to explain and I have no clue why I am getting a 'database' error.
Can't connect to MySQL server on '127.0.0.1' (61) error
when I click to my link here after I start the ...
0
votes
0answers
15 views
Getting undefined method `orders' for #<ActiveRecord::ConnectionAdapters::Mysql2IndexDefinition
Using activerecord-mysql2-adapter, I am getting
undefined method `orders' for #<ActiveRecord::ConnectionAdapters::Mysql2IndexDefinition
This is when I run rake db:schema:dump. I am trying to get ...
6
votes
2answers
82 views
Rails + MySQL + Transactions + Locking, how do I prevent opening a transaction from unlocking the table?
In my Rails code I need to confirm that an action is allowed only if there is more than 1 of a certain record remaining. For this reason I need to lock updates and then perform a read. My rails code ...
0
votes
1answer
52 views
Ruby on rails get mysql information depending on option value
I am wondering how I should go about retrieving information from a mysql database associated with my ruby on rails app. When a user selects a product from the select box, I want to use the value of ...
0
votes
0answers
12 views
Is it possible to have a schema file when using multiple databases in a Rails application?
For various reasons, I have an app that must use two databases in production (corporate data coming from an AWS read-only (redundancy) database, and another normal/writable database for certain lead ...
0
votes
1answer
112 views
Mac OS X Lion - mysql: command not found
I have installed MySQL from this source, installation was successfully finished.
But when I run in terminal which mysql, the output is empty.
When mysql, the output is
-bash: mysql: command not ...
0
votes
2answers
31 views
Trying to build rails 3.2 app over existing mysql db
I am trying to figure out how to build a rails app on top of an existing mysql db. I think the best method would just be to create a migration with the same layout as the existing db, but I am not ...
0
votes
0answers
33 views
Delete permission is granted for user to database but mongrel server shows Mysql::Error: DELETE command denied to user
Delete permission is granted for user to database but server shows Mysql::Error: DELETE command denied to user. I am using mongrel server for rails. When I login to mysql with same user credentials ...
1
vote
2answers
18 views
mysql2-0.3.11 can not be installed
Hi I want to install Gitlab on Debian 7.0 when i want to install the bundle i get follor error by mysql2-0.3.11
root@v22013051598612672:/home/git/gitlab# gem install mysql2 -v '0.3.11'
...
0
votes
2answers
33 views
WEBrick server keeps shutting down
I'm new to Ruby and Rails and setting up a project for the first time. Every time I try to start the WEBrick server it boots up and then shuts down. Any help would be appreciated. It seems like I need ...
0
votes
2answers
30 views
get a list of cities from location model and how many locations exist for each city
I have a location model which has a few columns: title, address, city, state, etc...
I am trying to show a list of all the cities based on the locations in my database. Then, I am trying to figure ...
0
votes
0answers
51 views
Rails 3: “Schema migrations table does not exists yet”
So some months ago, for some reason I got a weird git message and was afraid to deploy. So I started making changes to the production application directly and trying to also manually make the same ...
0
votes
3answers
56 views
Scheduling events, and having events cross midnight
I'm building a tv series scheduling app in Ruby on Rails which performs certain actions based on what's currently on tv. Users can create a series, which has a start and end date, and can create ...
0
votes
3answers
25 views
Able to add myself as friend in rails console
I have built a user and friend relationship model but the problem is that with those associations I can friend myself. I have successfully suppressed it in my views and controller, but logically it ...
0
votes
1answer
21 views
Comparison of multiple answers with multiple values
Let's say we have a model Answer with the following data:
pic_id | gender | is_nude | has_advertisement
2530 | female | 0 | 1
2530 | male | 1 | 0
2530 | male | 1 | ...
0
votes
1answer
31 views
How to group by day and year in Active Record in Rails3
I'm trying to recreate the following mysql query in rails 3
select count(id), year(created_at), month(created_at) from table where published_state = 'published' group by year(created_at), ...
0
votes
1answer
24 views
Missing the “C:\Program Files\MySQL\MySQL Server X.X” folder
I have been using mysql for quite a while now. But earlier this week when I was trying to install Ruby on Rails, I noticed that the "MySQL Server 5.5" (or anything like SERVER folder) was missing. So ...