Category "ruby"

Sinatra NoMethodError at / undefined method `stylesheet_link_tag' for #

I am currently making an app with sinatra and i've been working for hours to try to implement bootstrap in it, and realizing how much easier it is in rails. An

Incrementing letters using .next

def home letter = 'A' @markers = Location.all.to_gmaps4rails do |loc, marker| marker.infowindow render_to_string(partial: '/locations/info',

rbenv installation permission denied

Hi all I'm trying to set up a dev environment and I've been following a tutorial via; Link to tutorial I'm not doing very well and have no real experience of t

How to display Datatable tabletools (copy, csv, excel, pdf, save) in ruby on rails

I am using Datatable in my ruby on rails application. I follow the same one which is here.. https://github.com/rweng/jquery-datatables-rails And My datatable

WEBrick run on hanami 1.0.0 shows errors because of wrong inflection

I generated model with hanami generate model stimulus. Then I fixed "stimuluses" to "stimuli" in the migration file name and inside, the table name. Everytime

Ruby ODBC with remote database

I am working on an application that connects to a legacy database, Eloquence, through ODBC and SQL/R. I set up my server with UnixODBC and setup the drivers and

gem eventmachine fatal error: 'openssl/ssl.h' file not found

Just installed El Capitan and can't install gem eventmachine 1.0.7. openssl is at 1.0.2a-1. Tried to use --with-ssl-dir but it seems ignored. Reported it to th

Error building gems in Mountain Lion

I just bought a new MacBook Pro (obviously w/ML). First thing I'm doing is installing development tools. I installed Ruby with rvm and I've also got Homebrew in

Rails action Mailer raise_delivery_errors, how does it works? How to detect bounces?

I have a Rails 4.2.0 application which sends lots of mails, it's a elearning platfrom. At the moment I have problems with bounces, Lots of the Mails coming bac

Errno::EACCESS: Permission denied @ dir_s_mkdir

I am pretty new to Ruby.. was following the instructions on TeamTreehouse installing Ruby Development Environment on OSX (Yosemite). When I got to the step to

GroupingError: ERROR: column " " must appear in the GROUP BY clause or be used in an aggregate function

I am trying to create a list of unique patients who have left comments. The code words fine until I upload to heroku where it doesnt work in postgresql. This

Adding scope to get objects in reverse order of their created time in rails

I'm new to Ruby on rails and programming. I am working on a exercise where I have a Post model,and I need to add a new scope to it to retrieve its objects in re

profile.assume_untrusted_certificate_issuer = false not working for me

Using watir-webdriver for automation I'm not able to handle Firefox "Untrusted Connection" . Already tried this: require 'watir-webdriver' profile = Selenium

Rails Routes :shallow => true

Wondering why my /articles route is not coming up when I apply :shallow => true? routes.rb resources :users, :shallow => true do resources :articles e

Error while installing pod in Apple Silicon (M1)

Command i am running is brew install cocoapods Warning: cocoapods 1.11.2_2 is already installed and up-to-date. To reinstall 1.11.2_2, run: brew reinstall

Application.js not compiling after upgrading to Rails 7 on heroku with esbuild

I updated my app on Heroku from Rails 6 with Webpacker to Rails 7 with esbuild. The error I receive on production is as follows: The asset "application.js" is n

yast2 is broken after executing `zypper update`

I am a newer to use openSUSE. Recently I execute zypper update and found yast2 UI client cannot be launched. I can see the log in /var/log/YaST2/y2log: 2020-03

Ruby: checking if a string can be converted to an integer [duplicate]

Possible Duplicate:Test if a string is basically an integer in quotes using Ruby? "1" "one" The first string is a number, and I ca

Ruby return statement does not work with super keyword?

class Parent def test return end end class Child < Parent def test super p "HOW IS THIS POSSIBLE?!" end end c = Child.new c.test I th

Navigate to Ruby function definition in VS Code

I'm pretty new to Visual Studio Code, and I'm trying to edit some Ruby code. I installed Ruby support, and I enabled the language server, but Ctrl-clicking on a