cannot deploy multiple hosts in capistrano | Fixed issues |
- cannot deploy multiple hosts in capistrano
- How to include data-zoom-image in my image_tag on ruby rails 4.3.4
- Carousel in bootstrap modal in rails app
- Value of cookies variable is not passing in another controller when using Safari in Rails
- Selecting the first flash message in Rails
- Passenger Nginx proxy_pass
- Rails render_to_string
- how to insert multiple values into enum column?
- Pass query result from rails controller to javascript
- Stop the auto-indenting of ERB tags in Adobe Brackets
- From which directory run cap production deploy?
- Can i use something like Model.find(params[:id]) in a model.rb file? - Rails 4
- Simple_form Radiobuttons with Images
- Activerecord group/order by existing array
- i want to install Thrift 0.9.3 and Run it
- Carrierwave - Multiple images upload too slow when adding or removing images
- MDL drawer does not fill the height of the page?
- How to render patial through replaceWith()
- wicked_pdf stopped generating pdf files with the correct data
- How to notify a user after background task is finished?
- Rails/RSpec: 'Travel' time helper is not available in feature specs?
- HTML in url to on Rails
- What is the meaning of <%%= in Ruby on Rails?
- Flash Notice Alert dismissable bootstrap and rails -- Cannot Delete flash notice
- Encoding JWT key for APNS using rails RPUSH gem
- Capistrano linked_dirs doubles end of path
- Bundler could not find compatible versions for gem "rails": In snapshot (Gemfile.lock): rails (= 4.2.7.1)
- some blog sharing pop up, show pinterest-502 error. while locally working fine everything
- "libgcc_s.so.1 must be installed for pthread_cancel to work" when starting thin on Debian
- Convert milliseconds to hours and mins in ruby
cannot deploy multiple hosts in capistrano Posted: 08 Nov 2016 07:37 AM PST I'm using capistrano to deploy rails app to about 20 servers, it works ok when server num ~ 10, when increase it to >~ 10, it doesnt work anymore Here is the error I think there's something related to ssh max connection??? |
How to include data-zoom-image in my image_tag on ruby rails 4.3.4 Posted: 08 Nov 2016 07:36 AM PST I am trying to get my images to zoom in on my website. I have added to my GEMFILE, I have also added to my application.js file I am just abit confused due to being a new use on where to add data-zoom-image="images/large/image1.jpg In the code below: |
Carousel in bootstrap modal in rails app Posted: 08 Nov 2016 07:35 AM PST I'm trying to let product images appear in a carousel in a I'm only able to see the first image. At the moment they are three for this product. I have tried |
Value of cookies variable is not passing in another controller when using Safari in Rails Posted: 08 Nov 2016 07:29 AM PST I am trying to set a cookies variable in users controller like cookies[:uuid] = user.uuid and then passing this to home controller like @a = cookies[:uuid] The value of cookies[:uuid] is getting passed in chrome but not in safari browser. I checked in logs when using safari value of cookies:[uuid] is nil. Why is this happening? Am I missing something? |
Selecting the first flash message in Rails Posted: 08 Nov 2016 07:34 AM PST I only want to grab the first flash message. I have to send this message to an object. So far I have In some cases the flash doesn't exist at all so I have to first check that it exists, then see if it has a message. I honestly don't like it. Does the FlashHash or Rails have a method that does this behavior out-of-the-box? Is there a cleaner way to do this? Thanks. |
Posted: 08 Nov 2016 07:20 AM PST I have one landing page and rails app with Passenger+Nginx. I am trying to do something like this: |
Posted: 08 Nov 2016 07:16 AM PST I am having difficulty with the rails render_to_string function. I have created an app using the --api flag, so i think this may be the issue as i have tested in 'full' rails apps. Essentially i am calling: which should return the html for that template. The filename is print.html.erb and just has basic data. When i output the body_html it is empty. I referenced this SO question What is the correct way to render_to_string in wicked pdf? and am also going to use Wicked PDF to generate a pdf file. Many thanks |
how to insert multiple values into enum column? Posted: 08 Nov 2016 07:21 AM PST I am trying to insert multiple values into a POSTGREs of type enum I tried inserting data but it didn't work, how do i insert multiple enum values in postgres |
Pass query result from rails controller to javascript Posted: 08 Nov 2016 07:18 AM PST I have a project which is based on ruby on rails and js in front end.In one of the controller I get the query result @sites which consists of many rows like id amount NewYork 200 Seattle 10000 Toronto 30 ... .... Now I want to pass this arrays of objects to the front end which is js.In the javascript, I want to get the amount of every id.So what should I do? To make it in json? Or pass it by html? Thanks so much. |
Stop the auto-indenting of ERB tags in Adobe Brackets Posted: 08 Nov 2016 07:06 AM PST When using ERB in Brackets the auto-indenting is incredibly frustrating. It tends to un-indent lines that contain ERB tags as if it doesn't recognise them as part of the hierarchy. Sometimes I'll indent it to the right place and then as I'm changing a piece of code in the middle of the line Brackets will un-indent the whole line. Is there an extension that specifically tackles this problem? Is there a custom setting I could use to alter it myself? |
From which directory run cap production deploy? Posted: 08 Nov 2016 07:05 AM PST I want update site. I connect with ssh with remote server. Next I go to deploy@211449-2: cd apps/name_app I run From which directory need I run command cap production deploy? |
Can i use something like Model.find(params[:id]) in a model.rb file? - Rails 4 Posted: 08 Nov 2016 07:18 AM PST Could one kindly advise me how one defines the below code in the controller file in a
i am unsure: i tried the below in the user.rb model file but no success: |
Simple_form Radiobuttons with Images Posted: 08 Nov 2016 05:50 AM PST I've got a collection of radiobuttons: Now how can I add a different Picture to each of them? |
Activerecord group/order by existing array Posted: 08 Nov 2016 05:40 AM PST My db schema
My /streams url currently has the below way to sort the data recieved from mysql Basically, the results are currently being sorted by viewer count I want to add a function which sorts the initial table by showing followed streams first so that the followed streams always show up in the first result. I have the below which gives me an array of all streamids that the user has followed by this is there a way i can cross-reference |
i want to install Thrift 0.9.3 and Run it Posted: 08 Nov 2016 05:27 AM PST writing Thrift --version gives me |
Carrierwave - Multiple images upload too slow when adding or removing images Posted: 08 Nov 2016 05:25 AM PST I'm following this article in CarrierWave Wiki https://github.com/carrierwaveuploader/carrierwave/wiki/How-to%3A-Add-more-files-and-remove-single-file-when-using-default-multiple-file-uploads-feature to implement adding more images and removing images for a model in my system using CarrierWave Multiple Uploads feature. The main code in that article is It works. However, it is too slooooow. I have looked at the log and the overall processing time is as follow:
I have tested the sample app of this solution written by the author on my local machine and it was very slow too. It seems like CarrierWave reuploads and re-processes all images even we only add or remove 1 image. I think because we are re-assigning back new array of images to @gallery so that it treats old images as new ones. Also there is a related issue here https://github.com/carrierwaveuploader/carrierwave/issues/1704#issuecomment-259106600 Does anyone have any better solution for adding and removing images using CarrierWave multiple upload feature? Thanks. |
MDL drawer does not fill the height of the page? Posted: 08 Nov 2016 05:14 AM PST I'm using Material Design Lite to add a fixed header and drawer to my Ruby on Rails app. As you can see in this video, when I navigate to another page, the drawer menu on the left hand side of the page does not fill the height of the page. It remains at the abnormal height (even when I click another link) until I refresh the page. Can anyone figure out what's going on here? Here is the body of my application view: Thanks everyone! |
How to render patial through replaceWith() Posted: 08 Nov 2016 07:04 AM PST I have looked at similar question and the answers didn't work and may be dated. I think there used to be a thing called RJS to do this but, I am trying to simply remove one partial and replace another. What happens is the its sent to the browser as text and just displays <%= escape_javascript render(partial: "photoSpread") %> |
wicked_pdf stopped generating pdf files with the correct data Posted: 08 Nov 2016 05:02 AM PST |
How to notify a user after background task is finished? Posted: 08 Nov 2016 05:19 AM PST I use rails with Rails and sidekiq work as different processes. This fact confused me I don't understand how to handle completed status using background job. |
Rails/RSpec: 'Travel' time helper is not available in feature specs? Posted: 08 Nov 2016 04:46 AM PST I just tried to use Rails' time helper method It's giving me this: What am I missing? http://api.rubyonrails.org/classes/ActiveSupport/Testing/TimeHelpers.html |
Posted: 08 Nov 2016 07:16 AM PST I want to have a link with HTML content in Rails 5 but it's seems that my code doesn't work: I've got a SyntaxError in Admin::IndexController#index I want to go to my admin/index controller with index action... Thanks. |
What is the meaning of <%%= in Ruby on Rails? Posted: 08 Nov 2016 05:08 AM PST I cannot find it anywhere but in the project I am working with. It doesn't work in the same way as |
Flash Notice Alert dismissable bootstrap and rails -- Cannot Delete flash notice Posted: 08 Nov 2016 04:27 AM PST I am using an emailer with ruby on raiils and it has a flash notice on completion. I cannot seem to delete the bootstrap flash notice when I Press the x button listed next to the flash notice. I have tried jquery. Whenever I put the class close on the button. the button does not even show up to even be clicked. Here is some of my code. This is my create.html.erb This is my contact controller that emails me from a contact me form and renders the flash notice Here is some of my application.js code... it is messy and I have tried all of the following and left them all up to show you what I have done so far in my attempts. |
Encoding JWT key for APNS using rails RPUSH gem Posted: 08 Nov 2016 05:42 AM PST I want to use JWT key to send push notifications I searched for libraries implementing JWT token standard: https://jwt.io/ So I found ruby-jwt gem: https://github.com/jwt/ruby-jwt But it seems that it can't create key with the structure required by Apple: Also, how should I use APNs Auth Key (.p8 mime-type) to generate JWT token? Any advices are welcome UPDATE Ok, I found out, that it is possible to add custom fields to header https://github.com/jwt/ruby-jwt/pull/8/files Anyways, how should I use APNs Auth Key? Does rpush gem supports jwt tokens? |
Capistrano linked_dirs doubles end of path Posted: 08 Nov 2016 04:09 AM PST I recently upgraded to rails 5 and capistrano 3.5. Now im facing the issue, that every folder in :linked_dirs gets double-symlinked: In my deploy.rb This results in: It searched the documentation, stack overflow and github issues for hours now.. The behaviour is the same for:
I would be glad if someone has any idea what else i could try. :( |
Posted: 08 Nov 2016 06:39 AM PST I am upgrading to openproject lastest version 6, however while running bundle install, I am getting the following error: Bundler could not find compatible versions for gem "rails": In snapshot (Gemfile.lock): rails (= 4.2.7.1) In Gemfile: rails (>= 4.2.7.1, ~> 4.2.7) Any help would be appreciated. Thanks, Rahul |
some blog sharing pop up, show pinterest-502 error. while locally working fine everything Posted: 08 Nov 2016 03:56 AM PST and my js pop up shows 502 error, Our server is experiencing a mild case of the hiccups. We've reported it to the team. |
"libgcc_s.so.1 must be installed for pthread_cancel to work" when starting thin on Debian Posted: 08 Nov 2016 03:39 AM PST I am using thin as development web server with Rails on Debian 7. Since I've updated Rails to 4.2.7.1 I cannot launch thin anymore and I'm getting this error message : I have a I have tried every answer to this question but it didn't help. |
Convert milliseconds to hours and mins in ruby Posted: 08 Nov 2016 05:24 AM PST I have the following Rails helper to convert milliseconds to hours and mins: However it always just returns it in minutes (e.g. 364m) and doesn't show the hours... and keep the minutes under 60. |
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