Questions tagged [rake]
Ruby build utility similar to make with build commands defined in pure Ruby.
4,375
questions
-2
votes
1
answer
23
views
How to resolve stopwords error in Rake along with many more?
"D:\Python files\venv\Scripts\python.exe" "D:/Python files/main.py"
Traceback (most recent call last):
File "D:\Python files\venv\lib\site-packages\nltk\corpus\util.py", ...
0
votes
0
answers
30
views
Cannot run rake task in production, could not find stringio-3.0.9
I've got a sinatra app which I deploy using capistrano, there is a rake task which works on development but not on production. I get the following error when manually running rake in production;
$ ...
0
votes
1
answer
51
views
How do I spy on objects within the context of a rake task with rspec?
I have the following setup:
class Simple
def self.test; end
end
task a_simple_job: :environment do
counter = 0
while counter < 2
Simple.test
counter += 1
end
end
require "...
0
votes
0
answers
7
views
How to call a rake task programmatically - With arguments
I know we can run a task from within a rakefile like this:
Rake::Task['my_task'].execute()
How to do the same while passing arguments ?
0
votes
0
answers
27
views
Setting up `gemstash` to work with `rake release` in Ruby gem
I am trying to set up gemstash such that (1) it operates as a cache for rubygems.org and (2) it serves private gems that I want to test without making them public (yet).
For gems that I want to ...
1
vote
0
answers
19
views
How to tuning parameter in multi rake python?
I want to get the right summary output, therefore I try to make some changes to the parameters, but the output remains as expected. Is there a way to tuning parameters in the Rake object? how to get ...
0
votes
0
answers
42
views
Overwrite rake tasks in sinatra project and activerecord
I have a Sinatra fun project and I want to improve my rake tasks so that everytime I create a new migration and migrate it I don't have to manually run them with RACK_ENV=test bundle exec rake db:...
0
votes
1
answer
59
views
Run Ceedling from Rakefile
I am using ceedling to write unit tests. I also utilize a rakefile at the top level of my project to automate a variety of tasks. I would like to also use it to automate running ceedling. When I ...
0
votes
1
answer
31
views
How to run all the test files in a directory with Rake, from the command line?
I have some test folder:
app/
test/
folder1/
test1.rb
test2.rb
folder2/
test2_1.rb
test2_2.rb
test2_3.rb
I want to run only the tests from the 'folder2' ...
1
vote
0
answers
34
views
puppetlabs_spec_helper/rake_tasks - validate task - skip validation of specific file
I have a Puppet module which I'm setting up overall tests. I'm using puppetlabs_spec_helper/rake_tasks to get a sane task list, and defined a default task in my Rakefile:
require '...
1
vote
1
answer
124
views
Analyzing Survey data in R after creating raked weights with rake() from the R survey package
What is the proper way to use the raked weights created by the rake() function in the R survey package?
R documentation gives the following example:
library(survey)
data(api)
dclus1 <- ...
0
votes
1
answer
83
views
Getting cannot load file in Rails 7.0.7.1
Updated to 7.0.7.1 and now am getting "cannot find file" errors when requiring rails when running a Rake task. This happens when I try to run a rake task or even "rake --task".
...
0
votes
0
answers
591
views
Postgresql 15, pgvector and Ruby on Rails 7 - vector.control cannot be found
Our CI/CD uses GitHub actions for, among other things, running our test suite. When the database is set up in the action workflow, it fails when it attempts to run "CREATE EXTENSION vector;"...
0
votes
0
answers
44
views
Rake and Rails console throwing Postgres exception
We have a legacy Rails 4.1 application running on Ubuntu 22.04 TLS (rbenv 1.2.0, ruby 2.1.10, pg gem 4.0.1, Postgres 10) that runs correctly, but Rake (12.3.3) and Rails c (when accessing ActiveRecord ...
0
votes
0
answers
68
views
No module named 'rake_nltk'
from rake_nltk import Rake
def generate_ai_keywords(text):
# Initialize Rake object
rake = Rake()
# Extract keywords from the text
rake.extract_keywords_from_text(text)
# Get the top 10 keywords with ...
2
votes
1
answer
43
views
How to disable "smart stuff" in Ruby plugin for intellij idea
I use Ruby and Rake for a number of things.
I have tried using the Ruby plugin for intellij mainly for the block comment '#' insertion and syntax highlighting. But it does way TOO much "fancy ...
0
votes
1
answer
210
views
Rack::Chunked is deprecated and will be removed in Rack 3.1
When I start my rails app I get:
/Users/dorianmariefr/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-3.0.7/lib/rack/chunked.rb:6: warning: Rack::Chunked is deprecated and will be removed in ...
1
vote
1
answer
79
views
Rake task with both Active Record and View Helpers
I would like to apply ActionView::Helpers::NumberHelper#number_with_precision method to an attribute of an object of my (Active Record) model within a Rake task. I’d hoped this would work (but it ...
0
votes
1
answer
82
views
After running $ rake, and avoid rake aborted! `block in <top (required)>'
Following exercise at https://gitimmersion.com/lab_21.html inside folder lib I created two files:
a) hello.rb containing:
# Default is "World"
# Author: Jim Weirich ([email protected])
name =...
1
vote
1
answer
116
views
I'm start using Ruby Koans, but rake is aborting
I think I don't have something installed correctly, because I am getting to following errors:
when I enter
rake gen
I get
rake aborted!
Don't know how to build task 'gen' (See the list of available ...
0
votes
2
answers
15
views
Heroku pipeline release deducts error while on deployment
I have been trying to deploy rails4 and ruby 2.6.5 version in to Heroku pipeline. It gives following error during release step.
Error Trace
Running release command...
bundler: failed to load command: ...
0
votes
0
answers
42
views
Undefined method 'rake' for rake task with Rufus Scheduler
having some trouble setting up Rufus Schedular to perform a rake task. Using Rufus-schedular rather then whenever gem as on windows.
/lib/tasks/api.rake
require 'rake'
namespace :api do
desc "...
0
votes
0
answers
28
views
doesn't create table after migration creating in sinatra activerecord
After run rake db:migration I do rake db:migrate, but I don't see in console 'create table...' and when I run sqlite3 .tables , I don't see table
I don't know how to solve this problem. I tried ...
0
votes
0
answers
22
views
Why do fake tests run when I run a namespaced rake :db task when I set my local environment to "test"?
I made a ruby app using Sequel, minitest, and Rake. I have a couple of rake tasks namespaced with :db. When I run these after or before setting the local environment to TEST, for some reason a fake ...
0
votes
2
answers
382
views
Rails Runner or Rake task can't trigger Active Job job
I have setup a Rails 7 project running in Docker. Using the whenever gem (using cron) I tried to execute either
a rails runner task
a rake task
Both shall do the same thing: call a class method ...
0
votes
0
answers
252
views
Rails 6: Getting warning: previous definition of Socket was here rails aborted! NameError: uninitialized constant Rack::Cors
When I try rails db:create I get
warning: previous definition of Socket was here
rails aborted!
NameError: uninitialized constant Rack::Cors
I am trying to create db . I am new to rails so am not sure ...
0
votes
0
answers
34
views
Gems for rake DB
Good day
What I have add to gem file ?
And how install ?
TODONE:
added: gem 'rake', '0.8.7'
run: > bundle install
or run: > bundle install rake
All it's not work
Thank You
**Gemfile**
...
0
votes
0
answers
88
views
ActionController::RoutingError (No route matches "/welcome/admin_dashboard"):
I am trying to setup VirtualX Assessment Software that I downloaded online.
Here is the link where I got it: https://virtualx.sourceforge.net/download.html
I managed to make it run where I was able to ...
0
votes
1
answer
225
views
Adding a new add_column with a default value but different value for current entries
I'd like to add a column to my table with a default value of FALSE, but for current data entries the value should be TRUE.
For example:
class AddDidFoo < ActiveRecord::Migration[6.1]
def change
...
0
votes
0
answers
29
views
how to send data in quickbooks as a journal entries from the rake task of rails 6 app
i was trying to integrate quickbooks with my rails 6 app in which i need to run the rake task and it will send data to quickbooks as a journal entries. But all the articles i found was to connect ...
1
vote
1
answer
172
views
Run rake task from rails migration file
I have a rake task that I run from the terminal using the command below.
bundle exec rake migrations:seed_us_users
I have created this migration file but I don’t know how the code should be to run ...
0
votes
1
answer
97
views
Cannot call ruby rake with parameter containing spaces in jenkins pipeline
I have Jenkins Pipeline that will deploy a pod with a container using my ruby's application image, and there is a stage that will run a rake command from a $COMMAND parameter like this:
rake ...
1
vote
1
answer
494
views
rake aborted! NameError: uninitialized constant Products
Newbie on RoR and a little confused on whats happening.
I am following the tutorial here: https://www.javatpoint.com/ruby-on-rails-crud to create a crud application. On step 17 I have to run the "...
0
votes
2
answers
51
views
Rake test equivalent for ActionMailer::TestHelper?
We have recently migrated from sending emails with deliver_now to deliver_later. So that queued emails aren't lost when the system restarts, we implement this with Sidekiq.
When we used deliver_now, ...
2
votes
0
answers
574
views
Rails 6 API deployment error on Railway - rake assets:precompile
I am trying to deploy my Rails 6 API app on Railway and keep getting this error:
#18 [stage-0 14/14] RUN bundle exec rake assets:precompile
#18 sha256:...
-1
votes
1
answer
90
views
Set up some versions on rake db:migrate RAILS_ENV=production
im trying to update my Bitnami Redmine database, by using rake db:migrate RAILS_ENV=production but the problem is that the status says that i have many updates to do, but when i try theses updates i ...
0
votes
1
answer
72
views
Heroku deployment for Ruby / Sinatra / Postgres app "PG::ConnectionBad"
I’ve deployed my Ruby app on Heroku, however when looking to register or login I’m having an internal server error. My app is built on Sinatra and Rake.
When doing heroku logs -tail I’m having the ...
0
votes
0
answers
33
views
A question about the incorporation of clusters in the `rake` function
my question regards an example survey that includes a first-stage cluster and the application of survey::rake.
library(survey)
library(tidyr)
library(dplyr)
set.seed(111)
mood = sample(c("happy&...
1
vote
0
answers
46
views
$ characters get removed from json
I am currently improving the deployment process of our service.
In particular, I want to update the revision stored in the opsworks CustomJson stack property as soon as we have deployed a new one.
For ...
0
votes
1
answer
27
views
Rails: how to customize app-wide behaviors when running a rake task?
I have a rake task that performs activities that receives flags from the user on runtime. This task:
Runs methods across multiple models.
Changes settings that every model needs to know, almost like ...
0
votes
1
answer
275
views
Rake -T does not identify tasks
I am trying to setup a Rake Task (without rails), and thus created a demo Hello World Task. However, upon running rake -T or rake --tasks nothing is returned, as if the task hasn't been identified. ...
0
votes
1
answer
102
views
How to reference a function in a different rake file
I want to call a function that is in another rake file.
Rake File 1:
task :build => [:some_other_tasks] do
foo
end
def foo(type = :debug)
# ...
end
Rake File 2:
require_relative '...
-1
votes
1
answer
102
views
How do I easily restructure my Rails' DB not yet in production?
Problem: I'm creating a Rails app, single dev, running staged/prod servers on Heroku, not publicly released yet. Reworking my DB infrastructure, since I've done several migrations since creating ...
0
votes
0
answers
111
views
Rails - Override or forward a custom Rails terminal command
I have a very peculiar issue.
I'm using a VS code extension that trigger a test runner when I press some keyboard keys which has some sort of issue. Basically I can give it some settings and it will ...
1
vote
1
answer
79
views
rake db:migrate updates create_table block
I am resolving a conflict on schema.rb by running rake db:migrate
The migration changing the definition
create_table "data_migrations", primary_key: "version", id: :string, force: :...
0
votes
0
answers
115
views
Rails/Heroku: Could not detect rake tasks
I'm facing an issue when trying to push my code to Heroku.
I don't understand why, I searched a lot and tried a lot of solution like adding "rake" as a Gem in the Gemfile, add linux and ruby ...
0
votes
0
answers
55
views
NoMethodError: undefined method `[]' for #<ActiveRecord::Migration [duplicate]
I started to get this error:
"Your RubyGems version (2.5.2.3) has a bug that prevents required_ruby_version from working for Bundler. Any scripts that use gem install bundler will break as soon ...
1
vote
1
answer
488
views
Seeing GemWrappers error when doing bundle install
Doing bundle install using rails 6.1.5.11 and ruby 2.7.6, I keeping seeing a GemWrappers error after installing each gem e.g.
Fetching sprockets 4.0.3
Installing sprockets 4.0.3
...
6
votes
2
answers
4k
views
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) on apple M1 chip when running rake db:create
when I try to create my database this error appear
$ rake db:create
rake aborted!
LoadError: dlopen(/Users/agonzalez/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.6/lib/nokogiri/...
0
votes
0
answers
256
views
Heroku could not find rake-13.0.6 in any of the sources
I have a simple rake task that works locally but doesn't work on Heroku. It complains about not finding rake-13.0.6
➜ mw_wines_feed git:(master) heroku run rake mw_wines:import_feed
Running rake ...