How many app may be deploy on my VPS | Fixed issues |
- How many app may be deploy on my VPS
- Routing Error: No route matches [POST] "/flex_quiz/new"
- Ruby on rails bootstrap css js working but not found
- Rails5/Devise 4.0.1 Overriding Confirmations controller to allow password at activation: Token Blank
- Rails Tutorial- cannot get rails to recognize route
- Rails 4.2.6 FactoryGirl with polymorphic association
- Show brings up a list of data
- Rails 4 Image gallery options? [on hold]
- stderr /usr/local/bin/bundle: argument list too long while bundle install
- Rails, CarrierWave and AngularJS ngFileUpload
- RoR app - 'gem install mysql' error when running 'cap production deploy:initial'
- How to make charts in rails using csv/json files stored in database?
- Beanstalkd BackBurner not starting
- Error when trying get index of list nested route Rails "unexpected tIVAR"
- How to cache an array using Active Model Serializers (0.8)?
- awesome_nested_set (2.1.5) duplicate issue
- How can i use Soundmanager2 with ruby on rails
- Rails youtube thumbnail with scaffold
- How To Convert Rails Application Into An Actual Site
- Ajax "link_to" sending multiple requests controller requests when clicked really fast(Rails 4)
- In Rails How to display errors in my comment form after I submit it?
- How can I allow user put a website link into text_area and display the link that is clickable in Rails 4?
- Ruby on Rails where query with nesting relations
- Rspec tests are slower when I change the position of the validations in the model
- calling function in rails
- How to dynamically set the path of a link based on two different inputs?
- Rails Routes - Id and name with spaces replaced with hyphens
- Sum of all amount if charge dates are the same in Stripe
- How much Rails knowledge do I need to develop a Shopify App?
- Advance Active Record Joins
How many app may be deploy on my VPS Posted: 30 Apr 2016 07:03 AM PDT I have a VPS that have : RAM : 512 MB, CPU : single core, OS : centos , and unicorn server . And have 50 GB disk space I want to know how many rails app i can deploy on this vps . Or totally what a rule between number of apps and vps's informations ? |
Routing Error: No route matches [POST] "/flex_quiz/new" Posted: 30 Apr 2016 06:37 AM PDT In my rails app I'm trying to use a form partial to display the same quiz on the Here is the And here's how the locals stand in my And my Here are the route paths: Can anyone suggest how to fix this? I have looked at several similar posts (like this and this) but since I'm using partials the solution here is going to have to be a bit different. |
Ruby on rails bootstrap css js working but not found Posted: 30 Apr 2016 06:37 AM PDT I have a rails application which I added the bootstrap gem first I added this two gems which installed this packages After I modified Then I left Lastly my Bootstrap seems to we working, but in the Google Chrome console seems not to be found |
Rails5/Devise 4.0.1 Overriding Confirmations controller to allow password at activation: Token Blank Posted: 30 Apr 2016 06:35 AM PDT Using the wiki tutorial, I've implemented the gradual engagement approach to registration. Now, after clicking the "confirm" link in email, the password page will say "Confirmation token can't be blank". It's being submitted in the form, I can see the params passed in the log, but it's a hash How can I remedy this issue? |
Rails Tutorial- cannot get rails to recognize route Posted: 30 Apr 2016 06:29 AM PDT I am new to programming in general, someone referred me to railstutorial.org. Specs: I am working on a cloud9 IDE, as suggested in the tutorial. Information: I am on 1.3 of the rails tutorial, which is setting the root route. The problem was initially my route did not effect the server launch (root page was still ruby default, not to 'application#hello'). Here are the files that the tutorial said to edit. routes.rb application_controller.rb There are a lot of comments that were defaulted into the files that I left out. I have followed the instructions precisely. After I first had trouble, I thought I may have made an installation error, so I deleted my IDE and restarted, paying extreme attention to detail, especially versions. I have tried $ rake routes, and my understanding it gives the message: That leads me to believe that the problem is the routes.rb file. I have tried changing the syntax to: I don't know a whole lot, such as how it would work using application, so I also tried: and These all result in the no routes defined message. I have no idea what is going on. Thanks for any input or help! |
Rails 4.2.6 FactoryGirl with polymorphic association Posted: 30 Apr 2016 06:13 AM PDT I have a problem setting up factories for my polymorphic associations with FactoryGirl. My model and factory setup looks like this: The test suite breaks with the following error message This is exactly my problem but unfortunately his solution is not working for me. Thanks you all for your time! |
Posted: 30 Apr 2016 06:07 AM PDT I am trying to show a list of all the items I've created. (Called "join") In the show.html.erb, I wrote And It's working, but when I go to the page I get a bunch of data that says: |
Rails 4 Image gallery options? [on hold] Posted: 30 Apr 2016 06:41 AM PDT I am wondering how to display multiple images when a user clicks on a thumbnail using Rails 4. For example, a user clicking on a thumbnail in an image gallery full of shoes will display the image of the shoe in a dimmed pop-up window, but also allow the user to navigate left and right from that one thumbnail, to see multiple images of the shoe taken at different angles; the multiple angles of the shoes should be hidden unless clicked on by the user. I have heard of the paperclip gem, but the tutorials I have seen seem to focus more on single images displayed in a gallery. |
stderr /usr/local/bin/bundle: argument list too long while bundle install Posted: 30 Apr 2016 05:06 AM PDT I am using ansible to do deployment for my rails app. The problem is when a new gem is added and the ansible runs The ansible task to do bundle install is I am using rvm to manage ruby version. Using ruby-2.2.1 and I have set rvm to use gemset of myproject i.e. The I have specified This happens only when new gem is added in Gemfile, when there is only code update, everything works fine. If I run |
Rails, CarrierWave and AngularJS ngFileUpload Posted: 30 Apr 2016 04:41 AM PDT I have been trying to upload images for the past couple of hours using ngFileupload and had no luck, I am building a SPA (for learning purposes) using rails and angularJS for upload I am using Carrierwave. Here goes the problem, I have no clue what I am doing at this stage I have added Ng-file-uploader to my app as follows: and in the projectCtrl it is as follows: Now everytime I try to create a new project I get the following error Any help would be greatly appreciated. P.S. two weeks ago I was clueless when it came to JavaScript and AngularJS |
RoR app - 'gem install mysql' error when running 'cap production deploy:initial' Posted: 30 Apr 2016 04:18 AM PDT I'm attempting to deploy my Ruby on Rails app to a DigitalOcean droplet and I've been using this guide on how to do so, I followed a guide previously on how to deploy (a youtube video tutorial) but it didn't work so I've attempted this written guide. Everything has been working so far except when I attempt to deploy using Along with three other errors; see screenshot. How do I make sure it succeeds before bundling during the deploy? Is there any files I need to look at to make sure I've done everything correctly? Let me know if I need to include any other files. |
How to make charts in rails using csv/json files stored in database? Posted: 30 Apr 2016 03:55 AM PDT I have some csv/json data sets and a State (province of country) model in my appication. Now I wanna make another model Data and gonna relate it as follow :
Data Model attributes must be the files in csv/json format My state model has one attribute :
now when the current user's location matches the state model's name string I want to show the graphs in the profile page of user the graphs must be from DATA model's(contains csv / json files). Question 1: How do I store csv/json files in model ? Question 2: How do I make charts using csv and json files contained in rails model ? |
Beanstalkd BackBurner not starting Posted: 30 Apr 2016 03:13 AM PDT Whenever I am starting backburner I get following error but console shows daemon started successfully /Users/someuser/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/uri/generic.rb:214:in |
Error when trying get index of list nested route Rails "unexpected tIVAR" Posted: 30 Apr 2016 03:37 AM PDT I want to get a list of all the reviews that belong to a, which belongs a category. I'm getting an error when trying to get a list of all the reviews in a JSON file (it's a API application): "/Code/Rails/videogame_reviews/app/controllers/reviews_controller.rb:6: syntax error, unexpected tIVAR, expecting '(' @reviews = @category.@game.reviews ^". Could anybody explain why this is failing? @reviews = Reviews.all is working but shows all the reviews. This the is ReviewsController I've made a copy from the GamesController index which is working Here is the Reviews model This is the Game model And this is the Category model Here is the routes for the reviews |
How to cache an array using Active Model Serializers (0.8)? Posted: 30 Apr 2016 02:31 AM PDT On an individual Active Model Serializer you can specify the cache key within your serializer, i.e. Caching a single object using AMS Array caching I need to deliver an array of these objects: Rather than do 50 cache hits to construct the array I want to do a single cache hit and expire it when any of the array elements expires. How to cache the array (and construct the key)? I therefore want a cache key for the array that is made up of the individual object IDs and their last-updated at date like this: How can you do this with AMS (0.8)?Does the AMS array serializer allow for this or is it something that needs to just be done manually? Is there a way to declare that you want caching and how the key should be constructed? If it doesn't do it then what would be the neatest way to manually construct the cache/key? |
awesome_nested_set (2.1.5) duplicate issue Posted: 30 Apr 2016 02:27 AM PDT awesome_nested_set gem is behaving weird, what I understand is lft and rgt values should be unique for each record. Otherwise tree structure will not be proper. However, I can see duplicate records within a table. Below is the output of table. select lft,rgt from groups where company_id=1; I want the values should be unique, I have checked for validation while inserting records, but awesome_nested_set gem updates the value for lft, rgt periodically hence the already existing data of records gets change. Not really sure how the gem internally works. |
How can i use Soundmanager2 with ruby on rails Posted: 30 Apr 2016 02:17 AM PDT i'm a bit new to ruby on rails, i have uploaded the js scripts and the swf to my assets, i have also added the required lines to the appliction.js but when i put the script in my html.erb it does nt work Thanks in advance |
Rails youtube thumbnail with scaffold Posted: 30 Apr 2016 02:05 AM PDT I have made a post scaffold . I want to extract the URL FROM the description column in which they can write anything including a youtube URL. Then I want to get a thumbnail place it with an image tag . and when people click on that image tag I want it to direct to the youtube URL |
How To Convert Rails Application Into An Actual Site Posted: 30 Apr 2016 01:52 AM PDT I built a simple todo list application on Rails. I built it through Team Treehouse. It was one of the courses. I am wondering how would I convert it to a site. The reason being is because it would be a nice to add to my portfolio (I have yet to style it though). Would I simply upload the application to my github then go through such as I would to create a website through Github pages? I plan to buy a url for it. I am just simply trying to gauge out how would I approach converting it into a site. My apologies, it is a noob question. |
Ajax "link_to" sending multiple requests controller requests when clicked really fast(Rails 4) Posted: 30 Apr 2016 02:25 AM PDT Before I explain my problem, I will provide the relevant code for context. I have a Teams Model which is associated to a Scoreboard Model. The problem at hand is associated with Teams. The View for Teams Index The Partial for @scoreboard.teams The link_to I'm having trouble with is for the Edit Method. Team#edit Controller Method The edit.js.erb file Now, to explain the problem.I am in the development environment. In a perfect world, I would like to click on the link_to for edit and have the specific team div disappear right away(only so I can't click on it again) and render the edit form for that Team. However, during slow loads(happens a lot), I can click on the link_to two or three times and it calls multiple controller requests to the edit method. The problem with this is that the Jquery is also executed as many times as I clicked and I end up with 2 or 3 forms for the same element. For example, these are the log files when I click really fast on the link_to for Team with Id=50: Each request rendered edit.js.erb so I ended up with two forms. How can I make it possible that no matter how many times I am able to click on the "link_to" before it disappears, only one edit-form for that resource is generated? |
In Rails How to display errors in my comment form after I submit it? Posted: 30 Apr 2016 07:01 AM PDT I have a very straight-forward task to fulfil --- just to be able to write comments under posts and if the comments fail validation display error messages on the page. My comment model uses a gem called Acts_as_commentable_with_threading, which creates a comment model after I installed. On my post page, the logic goes like this: Posts#show => display post and a form to enter comments => after the comment is entered, redisplay the Post#show page which has the new comment if it passes validation, otherwise display the error messages above the form. However with my current code I can't display error messages if the comment validation fails. I think it is because when I redisplay the page it builds a new comment so the old one was erased. But I don't know how to make it work. My codes are like this: Comment.rb: PostController.rb: CommentsController: comments/form: (this is on the Posts#show page) |
Posted: 30 Apr 2016 01:43 AM PDT And user can put a description of the party. Also the user can type any link as description. However, after user saved, the link he typed is not clickable. I have to copy the link address and paste into browser to go to the site. Below is the How can I convert the link to clickable link if user typed any link? when show its description? |
Ruby on Rails where query with nesting relations Posted: 30 Apr 2016 01:09 AM PDT I learned how to use where query with relations from this question. Ruby on Rails where query with relations However, I still can't make it right with this nesting case. How can I make Summaries controllers index work? Model EntriesController SummariesController @Error log on iOS Error: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: internal server error (500)" UserInfo={NSUnderlyingError=0x1481b9030 {Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html" @Error log on Heroku [1m[36mUser Load (2.0ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m 2016-04-30T07:48:18.909397+00:00 app[web.1]: Completed 500 Internal Server Error in 4ms (ActiveRecord: 2.0ms) 2016-04-30T07:48:18.910250+00:00 app[web.1]: ActiveRecord::ConfigurationError (Association named 'reason' was not found on Reason; perhaps you misspelled it?): |
Rspec tests are slower when I change the position of the validations in the model Posted: 30 Apr 2016 12:34 AM PDT I have a big rails application in which I have tons of models. I have reorganized the content of the models to follow a common pattern (positions of the fields, constants, relations, validations, hooks and so on on all files). After finishing of doing this process, I have realized that the tests are slower (a controller test which takes 40 seconds, now it uses more than 1 minute). I have spent a lot of time trying to find the reason and finally I have found the problem. When I declare the validations after the relations, it takes more time to pass the tests (and the performarcen of the application is worse): On the opposite, if I declare the relations after the validations, the performance is the same as previous: I can't find a reason of this behaviour. Maybe it is because I am using mongoid 3 and this type of things are not happening with the next versions. However, for me it is more reasonable to have the relations before the validations because some of the validations reference to the relations. |
Posted: 30 Apr 2016 12:50 AM PDT I try to use a function in Rails but I keep getting the same error. I tried a bit of everything!! I define the function in my model. It is a big calculation but I completely simplified it too, and still get the same error!! My function in my model: Original function: Simplified version: The call from the controller: simplified: In both case I get the same error:
What am I doing wrong? Thank you!!!!! |
How to dynamically set the path of a link based on two different inputs? Posted: 30 Apr 2016 12:51 AM PDT I have a model The left side of the page shows the "A" movie and the right side shows the "B" movie. There's an option to remove the two current movies and input new ones. Right now the system I have is this: the "A" and "B" sides of the page both have a drop-down menu with clickable suggestions that come up as the user types, and clicking on a suggestion on the A side links to the same page except with For example, clicking on "Harry Potter" under the A side would use this link: But this way, the user has to wait for the page to load after selecting each movie. I want the user to be able to input both movies, and then press a button to reload the page with the new parameters. So I would need some kind of "Run Comparison" link button, and clicking on a suggestion would have to reset that link's path, probably using jQuery. The trick is, the "A" suggestions would have to take into account the most recent "B" suggestion, and vice versa. For example, if both selections are empty, and I select "Harry Potter" on the A side, then the link's path would be I'm completely lost. Anyone have any idea how to accomplish this? |
Rails Routes - Id and name with spaces replaced with hyphens Posted: 30 Apr 2016 04:02 AM PDT I am developing my first application in rails. I went through the Rails Routing from the Outside In documentation but unable to figure out how to setup the following route. I have a ClientsController and the for the show action I want to display the client's first and last name with spaces replaced with hyphens, in the url. Instead of the following localhost:3000/clients/1 the link should be (first name : john, last name : doe) localhost:3000/clients/1/john-doe |
Sum of all amount if charge dates are the same in Stripe Posted: 30 Apr 2016 02:07 AM PDT I'm iterating over a stripe charge object and I want to sum up the Views: Surely the above does nothing more than output lines of each charges but not the sum for the day. The difficulty I face is to sum up all charges for each day. Could someone point me in the right direction? The output would be like: Instead of: My |
How much Rails knowledge do I need to develop a Shopify App? Posted: 29 Apr 2016 11:50 PM PDT Can I learn Ruby and Rails on Codecademy and build a Shopify App? |
Posted: 29 Apr 2016 11:39 PM PDT I have the following models with Associations like so -- I've implemented a pretty decent filtering system taking into consideration just Items and properties like so -- and I call them in the controller like so -- How can I do build out a filtering system so that when for example a user searches for the color red, it not only returns items that have the property red but also return items which have customizations with the property red? |
You are subscribed to email updates from Newest questions tagged ruby-on-rails - Stack Overflow. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment