- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我使用 mac 和 rubymine 7.1.2 我想设置默认环境变量?是否可以根据运行配置设置它们,以便每个测试、Rails 生成器、Rails 控制台都可以访问它们。
是否有类似.env
文件之类的东西,所以可以只设置一次?
最佳答案
Jetbrains 实际上有 a page帮助您做到这一点:
Mac OS X applies .bash_profile and .profile only for Terminal.app environment and Apple's technical documentation suggests using ~/.MacOSX/environment.plist for other applications. So, by default PATH value will differ for RubyMine and the console.
MacOS 10.6 or later
We recommend to manage your environment variables using free Enviroment Variables preference pane instead of environment.plist manual editing.
MacOS < 10.6
Unfortunately, the "environment.plist" approach doesn't always work on MacOS < 10.6, e.g if you start RubyMine from Spotlight the environment is not applied.
Thus real solution is to set your environment variables in /etc/launchd.conf (thanks to David Goudreau for this tip). For detailed description please read Mac OS X Global Environment Variables article.
So you should:
Open /etc/launchd.conf file (e.g. $sudo nano /etc/launchd.conf)
Then set correct PATH env variable
setenv PATH /Users/romeo/.gem/ruby/1.8/bin:/opt/local/bin:/opt/local/sbin:/opt/local/libexec/git-core:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Set other env variables for RubyMine if necessary
Save changes
Reboot
P.S: If you always launch RubyMine using Dock or QuickSilver and do not use Spotlight you can install Enviroment Variables preference pane and use it instead of the manual environment.plist editing.
NB: Please don't miss "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" in the end of PATH value, because PATH=...:$PATH doesn't work here.
关于ruby - 在 RubyMine 中设置默认的 Ruby 变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31706725/
我可以为我打开的每个编辑器关闭它们,但是有没有办法一起删除软包装? 谢谢! 最佳答案 使用文件 | 设置 | Editor 全局永久禁用soft wraps: 关于rubymine - Rubymin
我可以为我打开的每个编辑器关闭它们,但是有没有办法一起删除软包装? 谢谢! 最佳答案 使用文件 | 设置 | Editor 全局永久禁用soft wraps: 关于rubymine - Rubymin
当我在 Mac RubyMine 上保存所有 (cmd+s) 时,有没有办法自动重新格式化我的代码? 我尝试将快捷方式 CMD + S 绑定(bind)到 Save All 和 Reformat Co
根据 http://blogs.jetbrains.com/ruby/2009/08/whats-mining-rails-i18n-support/应该有一个快速修复菜单,允许我创建翻译键。它似乎与
在 Visual Studio 中,编辑器有一个当前类中函数的下拉列表;单击一个将带我到该功能的顶部。有没有办法从 RubyMine 获得类似的行为? 最佳答案 我向 JetBrains 的人提出了这
File --> Settings --> Code Style --> Ruby提供了一些关于如何格式化代码的选项,但我没有看到设置或强制执行最大线宽的方法。这是否在其他地方支持,也许在插件中? 我
我正在尝试创建一个实时模板,其中第二个变量只是第一个变量的大写版本。预定义函数 capitalize(String) 似乎正是我所需要的,但我不知道如何实际传递变量。每次我尝试在表达式中设置参数时,它
我想使用 Rubymine 中的“搜索和替换”对话框,或类似的东西来用“@Desktop\nScenario”替换“Scenario:”之类的东西 我正在尝试将大型 Cucumber 测试套件中的 S
我尝试过的每个项目都会发生这种情况: 如果我使用终端并说 bundle install 或 rake db:migrate ,它工作正常,可以看到我的网站,工作完全正常。 但是如果我在 RubyMin
这似乎应该很容易。 我正在创建一个 CLI 命令 gem,所以命令在 bin/gem_name 中没有 .rb延期。当我尝试在 RubyMine 中编辑该文件时,它没有为其提供语言模式(抱歉,不知道正
我将 RubyMine 3.1.1 与 Rails 3.0.9 一起使用。 我有从 Github 克隆的 Spree 项目,我想在处理代码的同时调试服务器。为此,Spree 包含一个沙箱 rake 命
我正在使用 RubyMine 6.3。我尝试在 RubyMine 中配置 Sidekiq,但无法启动。 我将如何在 RubyMine 中配置和启动 Sidekiq? 最佳答案 转到运行/调试配置 添加
This教程声称在 Debug模式下运行 zeus 就像单击调试按钮一样简单,但是每当我这样做时,我都会收到以下错误 Fast Debugger (ruby-debug-ide 0.4.22, deb
我正在使用 Selenium、Capybara 和 siteprism 进行自动化。使用 rubymine,我想要完成代码以便我可以键入 @page。并使用 siteprism 获取方法列表(这有
我最近在第二台机器上安装了 RubyMine 并在那里克隆了一个 GitHub 存储库。 我的应用程序与第一台机器上的运行完全相同,但 RM 代码检查结果完全不同:我收到了数十个“无此类文件可加载”错
我是 Mac 上的 RubyMine 7 新手。我曾经使用 Sublime Text 3,到目前为止我很喜欢 RubyMine,除了它缺少文件预览功能。 在 Sublime Text 中,当单击侧边栏
我将 Rubymine 用于 Rails 项目。很多时候,Rubymine 会更改我不关心的 .idea/* 文件。但它一直阻止我检查新分支,并使我的 .idea/ 版本与我的同事不同。 我们已经将
我有使用来自共享上下文的变量的规范。设置看起来像这样: 共享上下文.rb RSpec.shared_context :handy_things do let(:handy_object)
我正在使用RubyMine 8.0.3,在.rb中有 3个文件夹和2个controller/api/v1 文件, 3个文件夹中没有一个是可见的,但是这两个.rb文件都可见。我重新打开了IDE,但没有任
rails 4.1.10 项目上的 Rubymine 7.1(构建 RM# 141.644)调试器非常慢。渲染页面需要 +12 秒。 我已经尝试按照 here 的描述设置我的 JVM 属性但它仍然 s
我是一名优秀的程序员,十分优秀!