Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Browsing all 4619 articles
Browse latest View live
↧

What does the operator ?: do in a Ruby regular expression when placed...

string = "This is a paragraph with a bunch3c:77:e6:68:66:e9of random MAC addresses 1100:50:7F:E6:96:20hello world 15:00s, 00:50:56:c0:00:08 some other text is written here 00-0C-29-38-1D-61...

View Article


Ruby on Jets issue while deploy

So I started to play with Ruby on Jets, a relatively new serverless framework for ruby and AWS, everything worked good on my local env, but once I started to deploy, I received an error on...

View Article


Pagination on Home Page - Want http://website.com/submissions/?page=2, not...

I'm using the Pagy Gem for pagination. What i'm trying to do is render the partial in my Home page with the pagination (this is working how I want currently), but I want the 2 in 1,2,3 Next > to go...

View Article

Dialog with FTP using Ruby

I want to start an FTP process, issue commands, check for a specially formatted response strings and capture them, then issue commands based on the captured strings.So the flow is:start ftpecho the...

View Article

Psych will not install when using a bundle install

I am trying to update some gems in my rails app and I get the error below when a gem called psych 5.0.2.I have seen similar reports of this issue on some sites but nothing that helped me. Any help...

View Article


I'm trying to add the Trix editor with ActionText without Webpacker into my...

I'm trying to add the Trix editor with ActionText into my Rails app, but I'm not using Webpacker. I've been following the official documentation, but it seems to assume the use of Webpacker. Can...

View Article

How do I perform a LIKE query on a PostgreSQL primary id column?

If I have a number (such as 88) and I want to perform a LIKE query in Rails on a primary ID column to return all records that contain that number at the end of the ID (IE: 88, 288, etc.), how would I...

View Article

Image may be NSFW.
Clik here to view.

link_to in rails with method :delete still performs GET request "Rails 7.1.3.2"

I wanted to run a delete method from the device authentication gemI tried both<%= link_to "Sign Out", destroy_user_session_path, method: :delete %>and<%= link_to "Logout2",...

View Article


Ruby : Applying a function to a RegExp to retrieve its parsed form

Im trying to convert a Ruby file to Python using a parser.For example parsing 'myvar.to_s' in ruby will give 'str(myvar)' in python.In my Ruby parser I do it like...

View Article


How to `bundle install` when your Gemfile requires an older version of bundler?

I am in an older Rails project that has a Gemfile. I tried to add a gem to the Gemfile and bundle install but got an error:Bundler could not find compatible versions for gem "bundler": In Gemfile:...

View Article

How do I tokenize this string in Ruby?

I have this string:%{Children^10 Health "sanitation management"^5}And I want to convert it to tokenize this into an array of hashes:[{:keywords=>"children", :boost=>10}, {:keywords=>"health",...

View Article

Follow BETA Inviter on Sign Up

I have created a BETA Invitation system by following this tutorial. http://railscasts.com/episodes/124-beta-invitations. Users can also follow one another in my Rails app.How can I have the Invitee...

View Article

How to preserve request url with nginx proxy_pass

I was trying to use Thin app server and had one issue.When nginx proxies the request to Thin (or Unicorn) using proxy_pass http://my_app_upstream; the application receives the modified URL sent by...

View Article


Gem::Ext::BuildError: ERROR: Failed to build gem native extension. Keep...

I am trying to run a bundler install on vscode for windows, but every time I do, I keep getting the same message:Fetching gem metadata from https://rubygems.org/.......Resolving dependencies...Using...

View Article

Don't memoize a variable across multiple http requests

Is it common for a variable to persist across requests when caching is turned off? Can I turn it off?I've always thought that if I want to persist data between requests, I should use a database or...

View Article


How to correct a Load Error of Nokogiri using Ruby on Rails?

I am quite sure I have exhausted every other resource trying to figure out why I keep getting a load error. There is something about nokogiri, bootsnap and spring that keeps coming up .I am using ruby...

View Article

How to use headless Chrome with Capybara and Selenium

Chrome version: 59.0.3071.104I am using Cucumber, Capybara, Selenium to implement automation testing with Headless Chrome.features/support/env.rbrequire 'rubygems'require...

View Article


Relation RubyGems, Ruby Version, Bundler Version, RVM and Capistrano Conflict

I have an ancient Ruby on Rails project that uses a Capistrano installation process. It currently runs Ruby 2.5.1 and Rails 5.2. I have been working on an updated version and while doing so probably...

View Article

Could not verify the SSL certificate for "My custom gem repo" [closed]

We have a custom gem repo created with https://github.com/geminabox/geminaboxRecently, our Wildcard SSL Certificate expired and we renewed it.Since then, every time we launch a bundler install command,...

View Article

encryption in logstash pipeline

I have below code in java, which encrypting input data using AESSecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256"); KeySpec spec = new PBEKeySpec(secretKey.toCharArray(),...

View Article
Browsing all 4619 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>