Unable to connect: Adaptive Server is unavailable or does not exist...
I'm trying to connect to a remote SQL Server (version 2014) from Ruby.I can connect via a UI Client, so the host, user, and password are correct.My code looks likerequire 'tiny_tds'client =...
View ArticleHow do I install ruby gems on Mac
How do I install RubyGems on my Mac?I tried to run $ gem install rubygems-update with no luck. It returns:ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for...
View ArticleIdentify sass mixin location at rails asset precompilation
I am updating a ruby on rails app. One of the problem I am encountering is that a sass is no longer compiling because of a missing mixin : Sass::SyntaxError: Undefined mixin 'transform'.When I am in...
View Articleruby mechanize proxy retry until connected
What I want to do is thisI have a proxy list with ip|portNow Mechanize is using those proxy and I have set open_timeout = 20 read_timeout = 20What I want it todo is to retry, but it will retry with the...
View ArticleSprockets::FileNotFound: couldn't find file 'jquery-1.7' with type...
I have upgraded an exsisting rails version 6.1 to 7.1.3 where i have usedsprocket-rails gem to work out the exsisting asset piple. after running the command bundle exec rake assets:precompile, i am...
View ArticleRuby Glimmer, running glimmer examples yields stacktrace
I am following the presentation of the RubyConf workshop detailed here: https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby and am already stuck at the second command. I issued gem...
View ArticleVerify background color for date of month
I have a calendar that shows each day of attendance. Each date has a different color display (Example: If an employee is present, then it is green. If absent, it should be red. If it's a holiday, it...
View ArticleYou have already activated X, but your Gemfile requires Y
When running rake I get this error:You have already activated rake 0.9.2, but your Gemfile requires rake 0.8.7. Consider using bundle exec.Using bundle exec rake instead of just rake seems to work, but...
View ArticleRuby/Rails security alerts
How do Ruby developers keep updated on ruby and rubygem security alerts and updates?. I found out about this...
View ArticleHow to run SQL Server on GitHub Action
I'm working on a small Sinatra app that needs to read data from a SQL Server database.As part of my tests, I have replicated the two tables I care about locally by running SQL Server on Docker.Now, I'm...
View ArticleIs there a way dynamically set class_name in belong_to associations
I have this class Churnedmodule AccountActivities class Churned < AccountActivity belongs_to :subscription, class_name: 'NewSubscription' endendnow, I have another subscription table called...
View ArticleBreak out of a begin/end block early
I want a way to exit a begin/end block while still assigning the variable that its result is assigned to.def foo @foo ||= begin puts "running" return "leaving early" if true # would be some sort of...
View ArticleCreating controllers and views for a has_many :through relationship in Rails 3
There are many tutorials that show you how to create the model instructions for a has_many :through relationship in Rails, but there doesn't seem to be many articles related to the process of setting...
View ArticleRuby Version Manager
I'm new to Ruby and currently using Windows 10. I'm facing difficulty installing RVM. Since I work on different projects with varying Ruby versions, I want to use RVM to manage them easily. Currently,...
View ArticleDisable CSV downloads in Active Admin
I am using the Active Admin gem and I would like to hide or remove the links on the index page of each model allowing users to download data as CSV, XML or JSON. Is there any way to do this?
View Articlebundler: failed to load command: puma
Im trying to run the heroku local command in CML heroku local. heroku local command allows you to boot the project locally in the same way that it will be once it's pushed to Heroku to troubleshoot...
View ArticleQR Codes not displaying in emails, Rails
I'm dealing with a legacy Rails website. I am trying to put QR codes in an email (which otherwise works normally on the website), uses QRCode.js.<% @tires.each do |tire| %><h3>TIRE <%=...
View ArticleRuby web scraping yields two numbers, I only want one
<span style=\"color: #888888;\"><strike>$44.99</strike></span><br>$15.29I am trying to scrape only the $15.29 via...
View ArticleRuby Web Scrape (Nokogiri) - cleanup
I'm experimenting on how to scrape a website for data. This is what I've put together after a few days of research, however, the output from Nokogiri is not as "clean" as I would expect. When I print...
View ArticleFind adjacents in bidimensional array (Minesweeper-like matrix)
I have a 2d array like this.[ ["+", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "+"], ["|", "*", "*", " ", " ", "*", " ", " ", " ", " ", "*",...
View Article