Mobile CSS view not working on Heroku, although working locally + popular fixes attempted | Fixed issues |
- Mobile CSS view not working on Heroku, although working locally + popular fixes attempted
- Rails automatically load lib from begining
- How to save 2 documents in mongodb collection instead of 1?
- In rails "get 'vendors/keyword_search', to: 'vendors#keyword_search'" runs "'vendors#show'"
- Rails : dynamically add helper to controller and access it in view
- Aggregating Order Data - Ruby on Rails
- rails: access method of ApplicationController in initalizer
- (rails) postgres error (column "posts.id" must appear in the GROUP BY clause)
- Devise_token_auth Reset Password Flow 401 Error
- Problems showing all Articles that have a certain Category in their list of categories?
- How to set up Google Calendar API using Ruby client for server to server applications
- Access deep nested objects in Rails
- How to group records and then select distinct records based on column
- Cucumber Test - Can anyone solve my 'edit' Scenario?
- Errors while creating object using simple form
- What is the difference between marked_for_detroy and destroy associated record in ActiveRecord?
- Counter cache returns 1 unless reloaded
- How to resolve error 504 Gateway Time-out in digitalocean rails
- How can I make specific user(not current_user) sign out on rails-devise website?
- Angular ng-token-auth with Rails devise-token-auth, submitRegistration promise not resolving
- Could not find json-1.8.2 in any of the sources (Bundler::GemNotFound)
- How do I alias a rails route with an id?
- reload rails form without changing current parameters
- Rails with ReactJS - realtime data fetch
- I am trying to use selenium in Capybara to locally test the rails app. I am using rake to start the task, but it gives following error
- Conversion of a javascript object to a ruby hash
- Creating dynamic workflow forms in Angular 2
- APIConnectionError with Stripe API
- Check for duplicate record and then create
- Run rails project on windows 7 VM
Mobile CSS view not working on Heroku, although working locally + popular fixes attempted Posted: 21 Nov 2016 08:20 AM PST I'm working on an app forked from https://github.com/jcs/lobsters and am having a heck of a time getting mobile css updated views on heroku. Everything is working locally. Here are the steps I've crossed off so far: Ran this (several times): Updated my prod environment like this: The application and mobile stylesheets both end in .css. My mobile selector (not that I think it matters since it's working locally) is: I've also restarted heroku a couple times and viewed page(s) in incognito to make sure it wasn't a local caching issue. And I've also changed the application.css and those changes happened on heroku. Appreciate any help. Thanks. |
Rails automatically load lib from begining Posted: 21 Nov 2016 08:23 AM PST I create a However, when I called it on I need to load this file by myself, so that it can be called. Like this. How do I make this file automatically being loaded? |
How to save 2 documents in mongodb collection instead of 1? Posted: 21 Nov 2016 08:14 AM PST On rails console, I am trying to save 2 categories in my book class. However my output returns 1 category. My code: Output on terminal both categories show name as 'fiction' not 'drama' futhermore, under testing - How do I ensure that 2 categorie_ids appear on db.books.findOne() ? Will much appreciate your advice.. |
In rails "get 'vendors/keyword_search', to: 'vendors#keyword_search'" runs "'vendors#show'" Posted: 21 Nov 2016 08:04 AM PST In a rails app, I am trying to setup a route to a keyword search page. I am trying to pass the following test: So far I have: in /views/vendors/index.html.erb in /routes.rb in /controllers/vendors_controller.rb I then have a /views/vendors/keyword_search.html.erb with the following: My issue seems to be coming after a click on the 'Keyword search' link. Rather than running Help on this would be greatly appreciated, but most of all I really want to understand why it's running Thanks |
Rails : dynamically add helper to controller and access it in view Posted: 21 Nov 2016 07:29 AM PST My code is as follows: What I would like to do is make some helpers dynamically available to the partial that I render. Ideally, I'd like to loop over an array of helper modules and extend the view so that my helper methods are accessible inside the view. Is this possible? (I know it's not clean code, but this is a very particular low level service) |
Aggregating Order Data - Ruby on Rails Posted: 21 Nov 2016 08:06 AM PST Looking for some advice on data aggregation for a Rails 5 API. We've got a system which broken down into its simplest components has a Products model and an Orders model. An Order has_many Products via a product_order join table. We're generating spreadsheets of orders which contain a summary page with the orders ID, price and order notes and then one workbook per order which lists the individual products for that order. We also need to output a summary page which contains an aggregated list of all of the Products and the quantity of each product ordered i.e.: etc. What's the best way to go about aggregating that data? Thanks, Mike |
rails: access method of ApplicationController in initalizer Posted: 21 Nov 2016 08:15 AM PST I am trying to call the method I get the error How can I access this method? |
(rails) postgres error (column "posts.id" must appear in the GROUP BY clause) Posted: 21 Nov 2016 07:45 AM PST Welcome..... I want to get the most user post on my rails app But I have issue with postgreSQL while my code work without any issue on sqlit3 and mysql2
I need to use postgreSQL because it is the best for heroku but i don't know why I get this error on PostgreSQL I hope if anyone help me >>> |
Devise_token_auth Reset Password Flow 401 Error Posted: 21 Nov 2016 06:47 AM PST I'm trying to build a rails API and I'm using devise_token_auth gem for user authentication using tokens. I managed to set everything up correctly and just bumped into a problem. Whenever I try to reset my password I get a 401 Unauthorized error from the API. The flow is as follows:
My problem occurs between step 8 and 9, where I get a 401 Unauthorized response. Why is that? What can I do to solve this issue? |
Problems showing all Articles that have a certain Category in their list of categories? Posted: 21 Nov 2016 07:55 AM PST Problems showing all Articles that have a certain Category in their list of categories? Models and migrations are fine, seeding is fine info in rails console is fine but in the Controller I have problems showing all Articles for a certain category I get from the URL: |
How to set up Google Calendar API using Ruby client for server to server applications Posted: 21 Nov 2016 06:45 AM PST It took me a bit of reading in several locations, as well as looking in Stack Overflow to figure out how to use the Google API Ruby client with Google Calendar in a server to server application without giving the server client full access to all users. I just wanted it to have the ability to get/create/update/delete events for a single calendar. There may be other ways to do this, but I'm documenting below how I did it as it may help someone else out. |
Access deep nested objects in Rails Posted: 21 Nov 2016 06:36 AM PST In my Rails app I have Users, Roles, and Permissions. The associations are as follows: When listing permissions I want to get the count of roles and users for that permission. I can do: But if I do: I get an error that In my controller I have: So should be pulling through the users as well... |
How to group records and then select distinct records based on column Posted: 21 Nov 2016 08:24 AM PST I am trying to group some records by category and then select all distinct/unique records based on alias column. Here is as far as i got but its not working - it still brings non distinct records. What am I doing wrong here? |
Cucumber Test - Can anyone solve my 'edit' Scenario? Posted: 21 Nov 2016 06:13 AM PST I'm new to cucumber testing and I am confused as to why this will not work. As you can see I am trying to test that the updated details of a location are shown after edit but I recieve the below error. Can anyone help me spot what is wrong? error = feature.rb = steps.rb = |
Errors while creating object using simple form Posted: 21 Nov 2016 06:10 AM PST i'm creating comments to post using simple form. It looks like this:
Also I have a validation in comments model: When I try to create empty comment I need to get errors under the fields. Here is should be 'can't be blank' under the body comment field Here is my comments controller (I'm using responders and decent_exposure)
I dont know should I check comment.save like this or not? If yes, what should I write to else? |
What is the difference between marked_for_detroy and destroy associated record in ActiveRecord? Posted: 21 Nov 2016 07:04 AM PST I understand that the autosave options has to be true and it happens when the parent is save. Is there any other differences? If the autosave is false, the associated record is left and only the link is removed? |
Counter cache returns 1 unless reloaded Posted: 21 Nov 2016 06:04 AM PST I'm having an issue where I render my view: helper: partial: |
How to resolve error 504 Gateway Time-out in digitalocean rails Posted: 21 Nov 2016 05:44 AM PST Deploy rails app on digitalocean and after done all config changes and bundle installation when I run droplet url I get an error /var/log/nginx/error.log How to resolve it? |
How can I make specific user(not current_user) sign out on rails-devise website? Posted: 21 Nov 2016 06:12 AM PST I want to know how I can make specific user(not current_user) sign out. I saw this http://www.rubydoc.info/github/plataformatec/devise/master/Devise/Controllers/SignInOut#sign_out-instance_method and maked this code. But it does not make that user sign out but make me(current_user) signed out. What is the right way to use the sign_out method? I checked this answer(Sign out specific user with Devise in Rails) but it was not helpful. |
Angular ng-token-auth with Rails devise-token-auth, submitRegistration promise not resolving Posted: 21 Nov 2016 05:20 AM PST I am using ng-token-auth with Angular and devise-token-auth on Rails. I have successfully managed to create users in the database using the Registration form however the submitRegistration promise doesn't resolve even though the callbacks from Rails are successful. Here is my Angular Controller submitRegistration function: Here is the terminal callbacks from Rails when I submit a registration form: The registration completes successfully on the Rails server however the promise from Angular never resolves. Please note the login and logout promises successfully resolve. |
Could not find json-1.8.2 in any of the sources (Bundler::GemNotFound) Posted: 21 Nov 2016 05:15 AM PST I deploy my app on digitalocean and doen all configuration chagnes. When I access its url it gives an error Error in unicorn.log is Error in nginx is |
How do I alias a rails route with an id? Posted: 21 Nov 2016 05:38 AM PST I have these routes: The redirect route does a 301 to /welcome/1. Instead of doing a redirect I'd like it to just execute users#welcome with an id of 1. How do I do this? |
reload rails form without changing current parameters Posted: 21 Nov 2016 04:32 AM PST can someone help me with this issue, I want to refresh page where rails form present with params filled in it, so when someone checked checkbox that page should be reload without changing values present in the form. Thanks in advance. |
Rails with ReactJS - realtime data fetch Posted: 21 Nov 2016 06:29 AM PST Can I fetch the data from the my database in realtime using Rails and ReactJS? I have just started using React with Rails as this is pretty awesome combination. What I want to know is if there is a way to tell the view to update itself after a component is deleted/ created (so a record is removed/ added to the database)? Something like user after entering the page will subscribe to the database event (?). What I have now is |
Posted: 21 Nov 2016 04:26 AM PST unable to connect to Mozilla geckodriver 127.0.0.1:4444 (Selenium::WebDriver::Error::WebDriverError) |
Conversion of a javascript object to a ruby hash Posted: 21 Nov 2016 04:35 AM PST In my existing ruby on rails application, I have a JavaScript object (hash) in one of my view file. The hash needs to be submitted back to the controller during form submission. I have converted the hash to JSON using JSON.stringify(hash_name) method. But it produces a string and I can get the string which looks like the hash in my controller. My purpose was not that. I need to dereference the hash in controller , so that I can save the dereferenced values into database. My hash looks like as following when I am printing it in controller: And it should be like it but not the string. I have a hidden field in my view. I am putting the hash to the value of the hidden field and submitting the form as In my controller I am getting the data as: But check_data is a string. But since its a string,my purpose was not solved. Please help me by giving some suggestions about how to pass the JavaScript hash to the controller as it is. Thanks in advance! |
Creating dynamic workflow forms in Angular 2 Posted: 21 Nov 2016 04:34 AM PST I am currently working on an Angular 2 application with a RoR backend. The application currently generates
I am wondering what would be a good approach to model this. I have about 15 I was wondering if people have experience with certain tasks in Angular 2 and if they think that I am looking in the good direction. |
APIConnectionError with Stripe API Posted: 21 Nov 2016 04:38 AM PST I am trying to integrate the Stripe API in my Rails project. But I am wondering why I have a failed APIConnectionError when I have checked that my internet connection is fine. In In the And in my In I have also included the I am not sure what I am missing and this is the error that I get when I call the What does it mean by the DNS not working and how can I debug by just running 'host stripe.com' |
Check for duplicate record and then create Posted: 21 Nov 2016 05:48 AM PST I have an rails app wherein am trying to either downvote or upvote an contact. I have a user model powered by devise. I have an feedback model too in place which stores which user has upvoted/downvoted an contact. How do I get to insert record into the feedback table when two users are trying to upvote/downvote the same contact details? |
Run rails project on windows 7 VM Posted: 21 Nov 2016 04:18 AM PST I have dual operating system on my machine windows and ubuntu. I want to run the server on ubuntu like this: Is it possible? |
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