You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

使用Ruby以外语言开发Redmine插件的可行性及相关问题咨询

Can You Develop Redmine Plugins With Languages Other Than Ruby (Golang, Elixir, Rust, Python)?

Great question! Let’s break this down clearly—Redmine is built entirely on Ruby on Rails, so its native plugin ecosystem is Ruby-focused, but that doesn’t mean other languages are off-limits. None of these alternatives will be as seamless as using Ruby, but each has viable workarounds depending on your use case.

Short Answer

Yes, you can use non-Ruby languages to build Redmine-related functionality, but it won’t be a "native" plugin experience. You’ll need to create bridges between your chosen language and Redmine’s core/Rest API, and you’ll face some inherent complexity compared to Ruby development.

Workarounds for Each Language

Here’s how you can approach each of the languages you’re interested in:

Golang

  • HTTP API Wrapper: Build a standalone Go service that handles your custom logic, then use Redmine’s REST API to sync data or trigger actions. Pair this with a tiny Ruby plugin that adds UI elements (like custom buttons or menu items) to call your Go service.
  • CGO + FFI: Compile Go code into a C shared library, then call it from a Ruby plugin using Ruby’s FFI (Foreign Function Interface). This lets you run Go logic directly within the Redmine process, but you’ll have to navigate CGO complexities and type conversions between Ruby and Go.

Elixir

  • Phoenix Service + Redmine API: Spin up an Elixir/Phoenix service to handle your core logic, then use Redmine’s API to keep data in sync. A minimal Ruby plugin can add UI hooks to connect users to your Elixir service.
  • Erlang Ports: Since Elixir runs on the Erlang VM, you can use Erlang ports to set up direct communication between a Ruby plugin and an Elixir process. This is more low-level but avoids HTTP overhead for bidirectional interactions.

Rust

  • FFI Bindings: Compile Rust code to a static/dynamic library, then integrate it with a Ruby plugin using tools like the rustler gem (which simplifies Rust-Ruby communication). This is ideal for performance-critical logic, as Rust’s speed can complement Ruby’s flexibility.
  • Standalone Web Service: Similar to Go/Elixir, build a Rust web service that talks to Redmine’s API, paired with a small Ruby plugin for UI integration.

Python

  • Subprocess Calls: From a Ruby plugin, spawn Python subprocesses to run your custom scripts. This is simple to set up but has overhead and requires careful handling of inter-process communication.
  • RPC Servers: Use tools like zerorpc or gRPC to run a Python server that your Ruby plugin can call directly. This is more efficient than subprocesses and supports structured data exchange.
  • Niche Data Use Cases: For data-heavy tasks, you could run a Python kernel (like Jupyter) and have your Ruby plugin send code snippets to execute, but this is rarely used for production plugins.

Common Challenges You’ll Face

  • No Native Hooks: You won’t have direct access to Redmine’s internal hooks (like controller_issues_new_after_save), so you’ll need to replicate functionality via the API or workaround it with UI hacks.
  • Data Sync Headaches: Keeping data between your external service and Redmine consistent can be tricky—you’ll need to rely on webhooks, polling, or custom database triggers to avoid mismatches.
  • Deployment Overhead: Instead of a single Ruby gem, you’ll have to manage two components (Ruby plugin + external service), adding complexity to deployment, scaling, and maintenance.
  • Debugging Complexity: Tracing issues across Ruby logs and your chosen language’s logs is harder, and you’ll have to troubleshoot type mismatches or communication errors between systems.

How Does It Compare to Ruby?

It will never be as smooth as using Ruby. Ruby plugins integrate seamlessly with Redmine’s core: you can directly extend models, controllers, views, and use all built-in hooks without extra layers. With other languages, you’re always working outside the native ecosystem, so you lose that tight integration and have to build bridges between systems.

That said, if you have existing expertise in one of these languages or need features Ruby doesn’t handle well (like high concurrency with Elixir, raw speed with Rust, or data science tools with Python), the workarounds are absolutely worth considering.

内容的提问来源于stack exchange,提问作者valik402

火山引擎 最新活动