Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant create any agents: ActionView::Template::Error (can't modify frozen String: ""): #2956

Open
positivegossip opened this issue Feb 27, 2021 · 4 comments

Comments

@positivegossip
Copy link

positivegossip commented Feb 27, 2021

I'm running the latest master branch on a Ubuntu Ubuntu 20.04 (LTS) x64 instance.

Running ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]

When trying to create a new agent over the webpanel, I get a error message: "We're sorry, but something went wrong."

Checking Rails Application log /home/huginn/huginn/log/production.log returns the following:

[6112654e-7c91-4d34-96ba-694fc04ea4a9] ActionView::Template::Error (can't modify frozen String: ""):
[6112654e-7c91-4d34-96ba-694fc04ea4a9]     25:           <% if @agent.new_record? %>
[6112654e-7c91-4d34-96ba-694fc04ea4a9]     26:             <div class="form-group type-select">
[6112654e-7c91-4d34-96ba-694fc04ea4a9]     27:               <%= f.label :type %>
[6112654e-7c91-4d34-96ba-694fc04ea4a9]     28:               <%= f.select :type, options_for_select(agent_type_select_options, @agent.type), {}, class: 'form-control', autofocus: true %>
[6112654e-7c91-4d34-96ba-694fc04ea4a9]     29:             </div>
[6112654e-7c91-4d34-96ba-694fc04ea4a9]     30:           <% end %>
[6112654e-7c91-4d34-96ba-694fc04ea4a9]     31:         </div>
[6112654e-7c91-4d34-96ba-694fc04ea4a9]
[6112654e-7c91-4d34-96ba-694fc04ea4a9] (eval):2:in `new'
[6112654e-7c91-4d34-96ba-694fc04ea4a9] (eval):2:in `html_description'
[6112654e-7c91-4d34-96ba-694fc04ea4a9] app/helpers/agent_helper.rb:94:in `block (2 levels) in agent_type_select_options'
[6112654e-7c91-4d34-96ba-694fc04ea4a9] app/helpers/agent_helper.rb:94:in `map'
[6112654e-7c91-4d34-96ba-694fc04ea4a9] app/helpers/agent_helper.rb:94:in `block in agent_type_select_options'
[6112654e-7c91-4d34-96ba-694fc04ea4a9] app/helpers/agent_helper.rb:93:in `agent_type_select_options'
[6112654e-7c91-4d34-96ba-694fc04ea4a9] app/views/agents/_form.html.erb:28
[6112654e-7c91-4d34-96ba-694fc04ea4a9] app/views/agents/_form.html.erb:12
[6112654e-7c91-4d34-96ba-694fc04ea4a9] app/views/agents/new.html.erb:14
[6112654e-7c91-4d34-96ba-694fc04ea4a9] config/initializers/silence_worker_status_logger.rb:3:in `call'

Any idea how to fix this issue? Thank you.

@MarkStanhope
Copy link

I have the same problem, running on Ubuntu 20.04

@positivegossip
Copy link
Author

I found out why this issue is happening.

The root cause fix is to upgrade rubygems. gem update --system

Specially foreman needs to be on the newest version.

@nkakouros
Copy link

I have the same issue and updating did not help.

@goodnewz
Copy link

I have the same issue and updating did not help.

So I had the same issue and moving to Ruby 2.6.6 did help me. See this comment for more details:

#2822 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants