Elastic Beanstalk: `/opt/elasticbeanstalk/containerfiles/envvars: No such file or directory` | Fixed issues |
- Elastic Beanstalk: `/opt/elasticbeanstalk/containerfiles/envvars: No such file or directory`
- RSpec stub object that doesn't exist yet
- Setting a blank custom header in ruby on rails
- Sending form data from one user to another
- How to get uploaded file path from Carrierwave in jquery in Rails
- how to show event in colorbox when clicked from calendar
- Color formatting for the running balance in rails 4.2
- How can I embed facebook videos on my blog by using the ruby gem red carpet?
- Why does not the remote form with Turbolinks 5?
- Devise secures all routes by default?
- Rails OmniAuth Facebook 'Redirect URL must be absolute'
- Ruby on Rails. Replace **Bold** with <b>Bold</b> with gsub()
- Undefined local variable or method for module
- Specify width in link_to image_tag
- Active Admin: Multiple Actions in same column similar to View, Edit, Delete
- How to redirect to external service page on post request?
- how to make this image hover effect like the airforce website?
- Search over 2 joins using Sunspot/Solr
- Redirect in routes.rb with wildcard values instead of params?
- Alternative for storing information between sessions similar to redis
- Carrierwave does not fallback to default_url even if file is missing
- Rails 5 on Bluehost
- Include CSS and Javascript Plugins in Ruby on rails
- How to click(using js) on element selectized with selectize.js
- Convert expects to assert + Integration Testing
- Rails app not reflecting recent changes at all
- "rails new [Blah]" No such file
- I18n translation with i18n-active_record: same form for same key
- How to handle LDAP Authentication errors in rails4
- elegant way to add css class in rails partials
Elastic Beanstalk: `/opt/elasticbeanstalk/containerfiles/envvars: No such file or directory` Posted: 05 Aug 2016 08:14 AM PDT I'm using Elastic Beanstalk to deploy a Rails app. I'm trying to setup Sidekiq too, using script below. However I keep getting error Errors I'm getting: |
RSpec stub object that doesn't exist yet Posted: 05 Aug 2016 08:07 AM PDT I'm needing to stub an ActiveRecord model before it has been retrieved from the db. Here's a simplified example: model.rb: model_spec.rb: Obviously, this test fails because the object that is retrieved in Caveats:
Ideally, I need something like |
Setting a blank custom header in ruby on rails Posted: 05 Aug 2016 08:11 AM PDT I'm writing a REST server using Ruby on rails. Some of the communication with the client is by setting certain custom headers to predefined values. In certain situations the server is expected to respond with a custom header that is an empty string. My problem is that rails seems to omit any blank headers from the response (it will even omit a whitespace header). This is my current code: Is there some way to configure rails to still send headers even if they are empty? |
Sending form data from one user to another Posted: 05 Aug 2016 07:50 AM PDT I am starting out on Rails and curious about how to build this system. I want User1 to fill out a form (their name, job title, and a message) and when they hit a "Send" button, it would pop up on User2's table to view. I would also want User1 to be able to send their form data to people with different roles (supervisor, assistant accountant, head sales, etc) User2 would have a 'view message' button and a 'delete message' button. I'm thinking User2 would have a desktop widget to view and delete messages. How would you build this? Just trying to learn more and thanks in advance from a beginner! |
How to get uploaded file path from Carrierwave in jquery in Rails Posted: 05 Aug 2016 07:42 AM PDT Im using Carrierwave on Rails to handle file upload. It's working well and I want to make new feature on my app to display uploaded file with jquery (kind of preview uploaded file) Therefore, I have to pass uploaded file url to the script Unfortunately, I have no idea how to do it. File upload model Form to upload new file jquery File Upload call Function to preview file |
how to show event in colorbox when clicked from calendar Posted: 05 Aug 2016 07:34 AM PDT
|
Color formatting for the running balance in rails 4.2 Posted: 05 Aug 2016 07:26 AM PDT Actually I have running balance in my statement and it reflects with colour that is when balance is positive it is black and when balance goes negative it becomes red. I would like to have same formatting to be applied when running balance is out of the statements table. Right now it shows '-' sign for negative values but I want to have to be in red colour without '-' negative sign. Please refer the screen-shot for better understanding as shown below; Running balance inside the table body; Running balance outside the table body; How do I retrieve the same formatting for the running balance in both the places. Any suggestions are most welcome. Thank you in advance. |
How can I embed facebook videos on my blog by using the ruby gem red carpet? Posted: 05 Aug 2016 07:16 AM PDT I figured out how to embed youtube videos by simply pasting the url of a video into the form. Therefor I used the following function in the appliaction_helper: Now I'd really like to know how to achieve this with facebook videos. Does anyone know an easy way how to embed them? (Using an ruby on rails application with the red carpet gem) |
Why does not the remote form with Turbolinks 5? Posted: 05 Aug 2016 06:48 AM PDT On page viewing post (show) there is add a comment form:
If the load (or reload) the page, the form will work. If you go out of the list of posts (index) page on the post (show), then the form will not work. By clicking on the "Send" button nothing happens. What is the problem? |
Devise secures all routes by default? Posted: 05 Aug 2016 07:59 AM PDT Is it normal behaviour for Devise to authenticate all requests to all routes after install? I have just installed Devise and not yet set a single I have also installed the Any idea what could be wrong? |
Rails OmniAuth Facebook 'Redirect URL must be absolute' Posted: 05 Aug 2016 06:30 AM PDT I am trying to set up omniauth to allow users to sign in to my website with facebook. I get the following error when i click on the log in button after following the Github Tutorial In my devise.rb file i have: I am using ngrok so i am able to test with a url that isnt localhost. The url generated is http://46cbf60d.ngrok.io In the facebook dashboard settings i have: And in the facebook dashboard 'products/facebook login' i have Does anybody know how to fix this error? |
Ruby on Rails. Replace **Bold** with <b>Bold</b> with gsub() Posted: 05 Aug 2016 07:01 AM PDT In my I have used Expected Output: This has a bold word inside. What I get: This has a bold word inside. html: How can I make only the words that is surrounded with ** get |
Undefined local variable or method for module Posted: 05 Aug 2016 07:31 AM PDT I have module and when i want to use
i have got an error but when i use it like it works fine Why it happens? |
Specify width in link_to image_tag Posted: 05 Aug 2016 06:30 AM PDT I am using the following code to link to logo on the nav bar: I need to specify the width of the logo, but have got a little confused. Tried in/out of the brackets, with a trailing comma - breaks every time. Any ideas? |
Active Admin: Multiple Actions in same column similar to View, Edit, Delete Posted: 05 Aug 2016 06:36 AM PDT I am using active admin gem to have a admin console for my ruby on rails application. I am having a problem where i want to have multiple custom actions to every item on index page just like View,Edit, Delete. But when adding custom action only the last one is displayed instead of all. Only resume link is shown instead of Approve/Disprove and resume What am i doing wrong |
How to redirect to external service page on post request? Posted: 05 Aug 2016 05:51 AM PDT I am posting some information to some external service, upon which it process the post params and should show its own page with the parameters I have sent. i.e It should be redirected to their site upon post request from my side. Here's what I am doing: I am using HTTParty to post the data to the their URL and storing the response in response object and using render :html to render to response. I am getting a their html in response object. here's the code: And in controller I am using render However, what is happening here is the response returns html which is rendered on my own application i.e localhost, it is also trying to search its assets in my app. What is expected here is upon hitting a post request it should redirect to their site. Any advice or help on how do I do achieve this? Thank You! |
how to make this image hover effect like the airforce website? Posted: 05 Aug 2016 05:47 AM PDT I keep trying but in vain I have 5 images side by side and want to make a hover width effect like the airforce website in section two...here is the website: https://www.airforce.com/ scroll down and you will see 5 images side by side and when you hover on an image the width expand without effecting the image itself..I keep trying but the image get effected always..I tried putting each image on bootstrap container and make the width effect on the container itself but the images keep expand as well,and here is my website on production: https://agile-coast-64468.herokuapp.com/ here is my home page: and here is my css : |
Search over 2 joins using Sunspot/Solr Posted: 05 Aug 2016 05:36 AM PDT I have 3 models (Rails) defined like so: I'm trying to search ModelA, but using ModelB#id and ModelC#attr1. I tried to do 2 joins (ModelB being in the middle), but it didn't work: Is this possible with Sunspot/Sorl? Possible workaround: I think I will have to index ModelC's data at least in ModelB and make a regular join. Or even index the data directly in ModelA. |
Redirect in routes.rb with wildcard values instead of params? Posted: 05 Aug 2016 05:50 AM PDT To redirect in routes.rb with params we use following syntax. If I want to pass the wild card url How can i do it. I tried the following it is not working. I there any hack around for this . |
Alternative for storing information between sessions similar to redis Posted: 05 Aug 2016 05:26 AM PDT For my project I use an external API. On every call the API provides a token so that the next time you request data they don't have to dump all data but just the updates. I would like this data to persist between different server sessions in development. On my mac OS I use redis for such things and store the tokens under keys, I am currently developing on windows and can not install any type of redis alternative, what would be best practice for these scenarios? Should I store this information in the DB or are there more efficient and cleaner ways? |
Carrierwave does not fallback to default_url even if file is missing Posted: 05 Aug 2016 05:18 AM PDT I'm using and mount it here When Im trying to set remote image even if no image is presented it doesn't fallback to Example: And when I access after reloading document But when access it in the browser it's showing 404. Any ideas? |
Posted: 05 Aug 2016 04:55 AM PDT I currently have a Rails 4.2.6 app running on Ruby 2.3.1 on Bluehost after following this tutorial: http://www.haydonryan.com/installing-ruby-2-1-1p76-and-rails-4-0-4-on-bluehost/ I am trying to update to Rails 5 app i get this error: Its showing the default version of Ruby, not my custom build. I figure it is probably an issue with my .htaccess and .bashrc files, but for the life of me i can't find a combination that works.... the strange thing is I have had the customs Ruby running for over a year without issue for the Rails 4.2.6 app. this is what I have so far: .htaccess in my rails app/public directory: and the .bashrc file in the root of my account (my rails app runs in an anon domain) and for completion, the .webrc file: any pointers would be greatly appreciated, I spent a whole day on this, manually installing gems/ changing the .bsahrc/.htaccess files with no luck... |
Include CSS and Javascript Plugins in Ruby on rails Posted: 05 Aug 2016 06:55 AM PDT I'm using a HTML, CSS, JS template to create the view for my Rails application. This template requires some plug-ins (mixed between CSS and JS files). I put these plug-ins in "/assets/plugins/" folders and make the call and it does not work. How can I call these plug-ins from my *.html.erb file? |
How to click(using js) on element selectized with selectize.js Posted: 05 Aug 2016 08:00 AM PDT We are using selectize.js to make select tags on our page. The problem with it is that there are made(those divs with options) when you click on select input so there are not in DOM after page load. What I need is to click (using javascript) on specified option after page load, but what I tried did nothing. (I want to pre-fill form when someone enters the page) Here's some code I've tried: (but I've also tried populate all needed inputs, but it didn't work neither. Any help would be appreciated! EDIT This is my select tag. This is my coffee: First line open select list, but rest do nothing. Nothing in console, nothing on page. Am I missing something? |
Convert expects to assert + Integration Testing Posted: 05 Aug 2016 04:23 AM PDT I'm using mocha and pry gem for below syntax but Now, I don't want to use gem. If I remove gem then I'm getting I don't want to use mocha and pry gem. So how can I convert this syntax that run without mocha and pry gem. |
Rails app not reflecting recent changes at all Posted: 05 Aug 2016 04:10 AM PDT I have a rails(Rails 3.2.12, ruby 1.9.3p547) app running on AWS ubuntu cloud server, with nginx as app server and unicorn as reverse proxy server. I have made few changes in the view file but those changes are not reflecting on browser. Code is currently live ("env=production")
but still got no help its still rendering the previous one. I tried commenting the whole controller file for the same view but still the app is not showing any error. I have confirmed that the app is running from the same folder in which I am making changes I got stuck at this point please help. Thanks in Advance |
"rails new [Blah]" No such file Posted: 05 Aug 2016 04:31 AM PDT So I'm new to Ruby and also to Rails. I have recently installed Ruby on Arch Linux. It was mostly all fine any happy except for a few errors here and there but now when I try initializing a new rails app using I've tried creating a file and directory called reinstalling rails same outcome reinstalling ruby same outcome following any other dependencies at install also leads no wear. Ask for any info you may need. Thanks in advance |
I18n translation with i18n-active_record: same form for same key Posted: 05 Aug 2016 04:03 AM PDT I am working on an app in Rails 4 using i18n-active_record 0.1.0 to keep my translations in the database rather than in a .yml-file. It works fine. One thing that I am struggling with, however, is that each translation record is one record per locale, i.e. which makes updating them a tedious effort. I would like instead to have it as one, i.e.: or similar in order to update all instances of one key in one form. I can't seem to find anything about that, which puzzles me. Is there any way to easily do this? Any type of hacks would be ok as well. |
How to handle LDAP Authentication errors in rails4 Posted: 05 Aug 2016 03:58 AM PDT In my rails4 application i am using 'devise_ldap_authenticatable' gem. Login parameters are username and password. In the application, i need to fetch 'Email' parameter and need to store in the db. Email Field is mandatory to login into the application. So in the user.rb , model validation is given for the email field as: In ldap_before_save method , i will get the parameter Email if that entry exists in LDAP. But if Email is not present i am getting Raw Error page with validation error "Validation failed: Email can't be blank". If i assign a default mail id, the issue solves, but we require the user to enter their mail and continue with the normal ldap authentication process. So how can i handle this error. Please help. Thanks in advance. |
elegant way to add css class in rails partials Posted: 05 Aug 2016 04:06 AM PDT I have partials which display in sidebar like below
now what i need when i render this partial i want to add css right now i render it with normal way what i need to include in above code so it will add active class on selected menu |
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